API CHANGE: Reorder parameters for some APIs.

The APIs that have changed are those that take an output pointer and an
input count in the format of "some_read_function(handle, pBuf, count)".

The updated APIs include:
  * mal_decoder_read_pcm_frames()
  * mal_pcm_converter_read()

Some APIs are scheduled to be replaced in a future version so I have
decided not to replace this at this time since it will be a waste of
time to do so.
This commit is contained in:
David Reid
2019-02-25 18:15:00 +10:00
parent 9ed608a452
commit 008cb41617
3 changed files with 34 additions and 33 deletions
+2 -2
View File
@@ -81,7 +81,7 @@ void data_callback(mal_device* pDevice, void* pOutput, const void* pInput, mal_u
return;
}
mal_decoder_read_pcm_frames(pDecoder, frameCount, pOutput);
mal_decoder_read_pcm_frames(pDecoder, pOutput, frameCount);
(void)pInput;
}
@@ -189,7 +189,7 @@ decoding backend.
Data is read from the decoder as PCM frames:
```
mal_uint64 framesRead = mal_decoder_read_pcm_frames(pDecoder, framesToRead, pFrames);
mal_uint64 framesRead = mal_decoder_read_pcm_frames(pDecoder, pFrames, framesToRead);
```
You can also seek to a specific frame like so: