mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 08:14:04 +02:00
Fix the dithering example from the last commit.
This commit is contained in:
@@ -74,9 +74,6 @@ int do_dithering_test()
|
|||||||
mal_device_uninit(&device);
|
mal_device_uninit(&device);
|
||||||
|
|
||||||
|
|
||||||
// Now we play the sound after it's run through a dithered format converter.
|
|
||||||
mal_sine_wave_init(0.5, 400, device.sampleRate, &sineWave);
|
|
||||||
|
|
||||||
mal_format srcFormat = mal_format_s24;
|
mal_format srcFormat = mal_format_s24;
|
||||||
mal_format dstFormat = mal_format_u8;
|
mal_format dstFormat = mal_format_u8;
|
||||||
mal_dither_mode ditherMode = mal_dither_mode_triangle;
|
mal_dither_mode ditherMode = mal_dither_mode_triangle;
|
||||||
@@ -112,6 +109,9 @@ int do_dithering_test()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now we play the sound after it's run through a dithered format converter.
|
||||||
|
mal_sine_wave_init(0.5, 400, device.sampleRate, &sineWave);
|
||||||
|
|
||||||
result = mal_device_start(&device);
|
result = mal_device_start(&device);
|
||||||
if (result != MAL_SUCCESS) {
|
if (result != MAL_SUCCESS) {
|
||||||
return -2;
|
return -2;
|
||||||
|
|||||||
Reference in New Issue
Block a user