public sealed class PcmStreamDecoderReads interleaved PCM out of a stream, without a codec.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
What a clip the content build decided was too big to hold in memory looks like: the same bytes Samples would have held, left in the bundle and read as they are needed. No compression, so no decoder — which makes this the implementation that proves the streaming path works before any codec exists, and the one a project with plenty of disk and no patience for Opus can ship on.
Little-endian, like everything the serializer writes, and the same two sample formats AudioClip allows, for the same reason.
Fields and properties (4)
public AudioFormat FormatThe rate and channel count it produces.
public long FrameCountHow many frames the whole track is, or -1 if the container does not say.
public long PositionWhich frame the next Decode starts at.
public bool CanSeekAlways. A region of a seekable stream is seekable.
Methods (4)
public PcmStreamDecoder(Stream stream, AudioFormat format, AudioSampleFormat sampleFormat = Int16, long dataOffset = 0, long dataLength = -1, bool ownsStream = true)A decoder over a region of a stream.
public int Decode(Span<float> destination, int frameCount)Decodes the next frames.
public void Seek(long frame)Moves to a frame.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (1)
- StreamingTestsVixen.Audio.Tests