mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Update examples.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount)
|
||||
{
|
||||
drwav* pWav = (drwav*)pDevice->pUserData;
|
||||
ma_assert(pWav != NULL);
|
||||
MA_ASSERT(pWav != NULL);
|
||||
|
||||
drwav_write_pcm_frames(pWav, frameCount, pInput);
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin
|
||||
float* pOutputF32 = (float*)pOutput;
|
||||
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) {
|
||||
if (!g_pDecodersAtEnd[iDecoder]) {
|
||||
|
||||
@@ -20,12 +20,12 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin
|
||||
{
|
||||
ma_sine_wave* pSineWave;
|
||||
|
||||
ma_assert(pDevice->playback.channels == DEVICE_CHANNELS);
|
||||
MA_ASSERT(pDevice->playback.channels == DEVICE_CHANNELS);
|
||||
|
||||
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. */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user