Updates to data sources.

* ma_data_source_read_pcm_frames and ma_data_source_seek_pcm_frames
    now return a result code and output the frames read/seeked as an
    output parameter.
  * These return MA_AT_END if the end of the data source has been
    reached. This should never be returned if the loop parameter is set
    to true.
This commit is contained in:
David Reid
2020-06-10 22:01:55 +10:00
parent 5f766acf8e
commit 86181dfac8
2 changed files with 152 additions and 37 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin
A decoder is a data source which means you can seemlessly plug it into the ma_data_source API. We can therefore take advantage
of the "loop" parameter of ma_data_source_read_pcm_frames() to handle looping for us.
*/
ma_data_source_read_pcm_frames(pDecoder, pOutput, frameCount, isLooping);
ma_data_source_read_pcm_frames(pDecoder, pOutput, frameCount, NULL, isLooping);
(void)pInput;
}