Reorder parameters in the callback.

This swaps the order of the input and output pointers so that it's
consistent with the order used by memcpy().
This commit is contained in:
David Reid
2019-01-12 11:04:11 +10:00
parent 67db06350d
commit 4980fcf3c5
9 changed files with 76 additions and 23 deletions
+2 -2
View File
@@ -23,12 +23,12 @@ void on_stop(mal_device* pDevice)
mal_event_signal(&g_stopEvent);
}
mal_uint32 on_send(mal_device* pDevice, mal_uint32 frameCount, void* pFramesOut)
void on_send(mal_device* pDevice, void* pFramesOut, const void* pFramesIn, mal_uint32 frameCount)
{
mal_assert(pDevice != NULL);
//printf("TESTING: %d\n", frameCount);
return (mal_uint32)mal_sine_wave_read_f32_ex(&g_sineWave, frameCount, pDevice->channels, mal_stream_layout_interleaved, (float**)&pFramesOut);
mal_sine_wave_read_f32_ex(&g_sineWave, frameCount, pDevice->channels, mal_stream_layout_interleaved, (float**)&pFramesOut);
}
int main()