From 9e14a9f8f8fec249146dd9a325873ac9dba127c5 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sun, 29 Apr 2018 16:42:47 +1000 Subject: [PATCH] Update tests. --- tests/mal_dithering.c | 4 ++-- tests/mal_test_0_build.bat | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/mal_dithering.c b/tests/mal_dithering.c index 1c4f8cdc..918f73bc 100644 --- a/tests/mal_dithering.c +++ b/tests/mal_dithering.c @@ -16,7 +16,7 @@ mal_uint32 on_convert_samples_in(mal_format_converter* pConverter, mal_uint32 fr mal_sine_wave* pSineWave = (mal_sine_wave*)pConverter->config.pUserData; mal_assert(pSineWave); - return (mal_uint32)mal_sine_wave_read(pSineWave, frameCount, pFrames); + return (mal_uint32)mal_sine_wave_read(pSineWave, frameCount, (float*)pFrames); } mal_uint32 on_convert_samples_out(mal_format_converter* pConverter, mal_uint32 frameCount, void* pFrames, void* pUserData) @@ -35,7 +35,7 @@ mal_uint32 on_send_to_device__original(mal_device* pDevice, mal_uint32 frameCoun mal_assert(pDevice->format == mal_format_f32); mal_assert(pDevice->channels == 1); - return (mal_uint32)mal_sine_wave_read(&sineWave, frameCount, pFrames); + return (mal_uint32)mal_sine_wave_read(&sineWave, frameCount, (float*)pFrames); } mal_uint32 on_send_to_device__dithered(mal_device* pDevice, mal_uint32 frameCount, void* pFrames) diff --git a/tests/mal_test_0_build.bat b/tests/mal_test_0_build.bat index 3fe3e188..c03c2715 100644 --- a/tests/mal_test_0_build.bat +++ b/tests/mal_test_0_build.bat @@ -1,7 +1,14 @@ @echo off SET c_compiler=gcc SET cpp_compiler=g++ +SET options=-Wall -mavx @echo on -%c_compiler% mal_test_0.c -o ./bin/mal_test_0.exe -Wall -mavx -%cpp_compiler% mal_test_0.cpp -o ./bin/mal_test_0_cpp.exe -Wall -mavx \ No newline at end of file +%c_compiler% mal_test_0.c -o ./bin/mal_test_0.exe %options% +%cpp_compiler% mal_test_0.cpp -o ./bin/mal_test_0_cpp.exe %options% + +%c_compiler% mal_profiling.c -o ./bin/mal_profiling.exe %options% +%cpp_compiler% mal_profiling.c -o ./bin/mal_profiling_cpp.exe %options% + +%c_compiler% mal_dithering.c -o ./bin/mal_dithering.exe %options% +%cpp_compiler% mal_dithering.c -o ./bin/mal_dithering_cpp.exe %options% \ No newline at end of file