Commit 62f2d693 authored by David Reid's avatar David Reid

Fix the dithering example from the last commit.

parent 51fd4505
...@@ -74,9 +74,6 @@ int do_dithering_test() ...@@ -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() ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment