Commit 51fd4505 authored by David Reid's avatar David Reid

Enable debug output for the dithering test.

parent d6f49f30
#define MAL_DEBUG_OUTPUT
#define MAL_USE_REFERENCE_CONVERSION_APIS #define MAL_USE_REFERENCE_CONVERSION_APIS
#define MINI_AL_IMPLEMENTATION #define MINI_AL_IMPLEMENTATION
#include "../mini_al.h" #include "../mini_al.h"
...@@ -51,9 +52,6 @@ mal_uint32 on_send_to_device__dithered(mal_device* pDevice, mal_uint32 frameCoun ...@@ -51,9 +52,6 @@ mal_uint32 on_send_to_device__dithered(mal_device* pDevice, mal_uint32 frameCoun
int do_dithering_test() int do_dithering_test()
{ {
mal_sine_wave_init(0.5, 400, 48000, &sineWave);
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);
mal_device device; mal_device device;
mal_result result; mal_result result;
...@@ -64,6 +62,8 @@ int do_dithering_test() ...@@ -64,6 +62,8 @@ int do_dithering_test()
return -1; return -1;
} }
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;
...@@ -75,7 +75,7 @@ int do_dithering_test() ...@@ -75,7 +75,7 @@ int do_dithering_test()
// Now we play the sound after it's run through a dithered format converter. // Now we play the sound after it's run through a dithered format converter.
mal_sine_wave_init(0.5, 400, 48000, &sineWave); 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;
......
...@@ -263,12 +263,12 @@ ...@@ -263,12 +263,12 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="mal_dithering.c"> <ClCompile Include="mal_dithering.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="mal_no_device_io.c"> <ClCompile Include="mal_no_device_io.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
...@@ -311,12 +311,12 @@ ...@@ -311,12 +311,12 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="mal_unplugging.c"> <ClCompile Include="mal_unplugging.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
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