From 4a67189f22770322c9856c0934cc23a70432e64c Mon Sep 17 00:00:00 2001 From: David Reid Date: Sun, 5 Jan 2020 10:17:02 +1000 Subject: [PATCH] Minor change to simple_playback_emscripten. --- examples/simple_playback_emscripten.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/simple_playback_emscripten.c b/examples/simple_playback_emscripten.c index cfd0b9cb..52d51128 100644 --- a/examples/simple_playback_emscripten.c +++ b/examples/simple_playback_emscripten.c @@ -12,7 +12,7 @@ void main_loop__em() #endif #define DEVICE_FORMAT ma_format_f32 -#define DEVICE_CHANNELS 1 +#define DEVICE_CHANNELS 2 #define DEVICE_SAMPLE_RATE 48000 void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount) @@ -24,7 +24,7 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin pSineWave = (ma_sine_wave*)pDevice->pUserData; ma_assert(pSineWave != NULL); - ma_sine_wave_read_f32(pSineWave, frameCount, (float*)pOutput); + ma_sine_wave_read_f32_ex(pSineWave, frameCount, DEVICE_CHANNELS, ma_stream_layout_interleaved, (float**)&pOutput); (void)pInput; /* Unused. */ } @@ -36,7 +36,7 @@ int main(int argc, char** argv) ma_device device; ma_sine_wave_init(0.2, 400, DEVICE_SAMPLE_RATE, &sineWave); - + deviceConfig = ma_device_config_init(ma_device_type_playback); deviceConfig.playback.format = DEVICE_FORMAT; deviceConfig.playback.channels = DEVICE_CHANNELS;