public interface IAudioStreamDecoderTurns whatever a track is stored as into frames, a block at a time.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
This is the seam a codec plugs into, and the reason the engine links none. docs/plan/08 wants Ogg or Opus kept compressed for music and decoded as it plays. A decoder for either is a native library or a large managed one, and a game with no music should not carry it — so the runtime knows this interface and the content pipeline decides what implements it. PcmStreamDecoder is the one implementation that needs no codec at all, and it is what a clip too big for memory is streamed through today.
Called from the pump thread, never from the audio callback. Blocking here is expected — that is the whole point of the arrangement. Decode may take a disk seek; the ring buffer in front of it is what stops that being audible.
Fields and properties (4)
AudioFormat FormatThe rate and channel count it produces.
long FrameCountHow many frames the whole track is, or -1 if the container does not say.
long PositionWhich frame the next Decode starts at.
bool CanSeekWhether Seek works.
Methods (2)
int Decode(Span<float> destination, int frameCount)Decodes the next frames.
void Seek(long frame)Moves to a frame.
Used by (10)
- AdpcmStreamDecoderVixen.Audio
- AdpcmTestsVixen.Audio.Tests
- AudioEngineVixen.Audio
- CodecTestsVixen.Audio.Codecs.Tests
- MatroskaAudioStreamDecoderVixen.Video
- OpusStreamDecoderVixen.Audio.Codecs
- PcmStreamDecoderVixen.Audio
- StepDecoderVixen.Audio.Tests
- StreamingSampleProviderVixen.Audio
- VorbisStreamDecoderVixen.Audio.Codecs