Commit df94bce3 authored by David Reid's avatar David Reid

Update examples.

parent 647f3764
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount)
{ {
drwav* pWav = (drwav*)pDevice->pUserData; drwav* pWav = (drwav*)pDevice->pUserData;
ma_assert(pWav != NULL); MA_ASSERT(pWav != NULL);
drwav_write_pcm_frames(pWav, frameCount, pInput); drwav_write_pcm_frames(pWav, frameCount, pInput);
......
...@@ -85,7 +85,7 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin ...@@ -85,7 +85,7 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin
float* pOutputF32 = (float*)pOutput; float* pOutputF32 = (float*)pOutput;
ma_uint32 iDecoder; ma_uint32 iDecoder;
ma_assert(pDevice->playback.format == SAMPLE_FORMAT); /* <-- Important for this example. */ MA_ASSERT(pDevice->playback.format == SAMPLE_FORMAT); /* <-- Important for this example. */
for (iDecoder = 0; iDecoder < g_decoderCount; ++iDecoder) { for (iDecoder = 0; iDecoder < g_decoderCount; ++iDecoder) {
if (!g_pDecodersAtEnd[iDecoder]) { if (!g_pDecodersAtEnd[iDecoder]) {
......
...@@ -20,12 +20,12 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin ...@@ -20,12 +20,12 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin
{ {
ma_sine_wave* pSineWave; ma_sine_wave* pSineWave;
ma_assert(pDevice->playback.channels == DEVICE_CHANNELS); MA_ASSERT(pDevice->playback.channels == DEVICE_CHANNELS);
pSineWave = (ma_sine_wave*)pDevice->pUserData; pSineWave = (ma_sine_wave*)pDevice->pUserData;
ma_assert(pSineWave != NULL); MA_ASSERT(pSineWave != NULL);
ma_sine_wave_read_f32_ex(pSineWave, frameCount, DEVICE_CHANNELS, ma_stream_layout_interleaved, (float**)&pOutput); ma_sine_wave_read_pcm_frames(pSineWave, pOutput, frameCount, ma_format_f32, DEVICE_CHANNELS);
(void)pInput; /* Unused. */ (void)pInput; /* Unused. */
} }
......
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