mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 09:14:04 +02:00
Minor change to simple_playback_emscripten.
This commit is contained in:
@@ -12,7 +12,7 @@ void main_loop__em()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEVICE_FORMAT ma_format_f32
|
#define DEVICE_FORMAT ma_format_f32
|
||||||
#define DEVICE_CHANNELS 1
|
#define DEVICE_CHANNELS 2
|
||||||
#define DEVICE_SAMPLE_RATE 48000
|
#define DEVICE_SAMPLE_RATE 48000
|
||||||
|
|
||||||
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)
|
||||||
@@ -24,7 +24,7 @@ void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uin
|
|||||||
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(pSineWave, frameCount, (float*)pOutput);
|
ma_sine_wave_read_f32_ex(pSineWave, frameCount, DEVICE_CHANNELS, ma_stream_layout_interleaved, (float**)&pOutput);
|
||||||
|
|
||||||
(void)pInput; /* Unused. */
|
(void)pInput; /* Unused. */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user