mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
API CHANGE: Move pUserData from device_init() to device_config_init().
This change makes it consistent with mal_pcm_converter, mal_src, etc.
This commit is contained in:
@@ -52,12 +52,12 @@ mal_uint32 on_send_to_device__dithered(mal_device* pDevice, mal_uint32 frameCoun
|
||||
|
||||
int do_dithering_test()
|
||||
{
|
||||
mal_device_config config = mal_device_config_init_playback(mal_format_f32, 1, 0, on_send_to_device__original);
|
||||
mal_device_config config = mal_device_config_init_playback(mal_format_f32, 1, 0, on_send_to_device__original, NULL);
|
||||
mal_device device;
|
||||
mal_result result;
|
||||
|
||||
// We first play the sound the way it's meant to be played.
|
||||
result = mal_device_init(NULL, mal_device_type_playback, NULL, &config, NULL, &device);
|
||||
result = mal_device_init(NULL, mal_device_type_playback, NULL, &config, &device);
|
||||
if (result != MAL_SUCCESS) {
|
||||
return -1;
|
||||
}
|
||||
@@ -102,9 +102,9 @@ int do_dithering_test()
|
||||
return -3;
|
||||
}
|
||||
|
||||
config = mal_device_config_init_playback(converterOutConfig.formatOut, 1, 0, on_send_to_device__dithered);
|
||||
config = mal_device_config_init_playback(converterOutConfig.formatOut, 1, 0, on_send_to_device__dithered, &converterOut);
|
||||
|
||||
result = mal_device_init(NULL, mal_device_type_playback, NULL, &config, &converterOut, &device);
|
||||
result = mal_device_init(NULL, mal_device_type_playback, NULL, &config, &device);
|
||||
if (result != MAL_SUCCESS) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user