AudioAPI reference
Interface IAudioStream
Namespace: MicroEngine.Audio
Assembly: MicroEngine.Audio.dll
Guide: Audio
Streamed audio (music decoded while it plays). The engine reads it only in Pump, on the main thread outside the simulation step, ahead of the sink.
public interface IAudioStream : IDisposableImplements
Properties
Channels
1 or 2.
int Channels { get; }Property Value
SampleRate
Frames per second.
int SampleRate { get; }Property Value
Methods
Read(Span<float>)
Fills buffer with interleaved samples; returns how many it wrote, 0 at the end.
int Read(Span<float> buffer)Parameters
Returns
Rewind()
Goes back to the start (looping).
void Rewind()