Commit 008cb416 authored by David Reid's avatar David Reid

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.
parent 9ed608a4
......@@ -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:
......
......@@ -17,7 +17,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;
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment