The OpenD Programming Language

AudioStream.readSamplesFloat

Read interleaved float samples in the given buffer outData.

  1. int readSamplesFloat(float* outData, int frames)
    struct AudioStream
    nothrow @nogc nothrow @nogc
    int
    readSamplesFloat
    (
    float* outData
    ,
    int frames
    )
  2. int readSamplesFloat(float[] outData)

Return Value

Type: int

Number of actually read frames. Multiply by getNumChannels() to get the number of read samples. When that number is less than frames, it means the stream is done decoding, or that there was a decoding error. If there was an error, isError() is set. Do not call decoding again in that case.

TODO: once this returned less than frames, are we guaranteed we can keep calling that and it returns 0?

Meta