mirror of
https://github.com/mackron/miniaudio.git
synced 2026-05-05 14:44:03 +02:00
Remove the conversion test.
This was a nothing test. Probably a placeholder from earlier work. Tests for conversion routines can be added to testbench later.
This commit is contained in:
@@ -919,9 +919,6 @@ if(MINIAUDIO_BUILD_TESTS)
|
|||||||
add_miniaudio_test(miniaudio_testbench testbench/testbench.c)
|
add_miniaudio_test(miniaudio_testbench testbench/testbench.c)
|
||||||
add_test(NAME miniaudio_testbench COMMAND miniaudio_testbench)
|
add_test(NAME miniaudio_testbench COMMAND miniaudio_testbench)
|
||||||
|
|
||||||
add_miniaudio_test(miniaudio_conversion conversion/conversion.c)
|
|
||||||
add_test(NAME miniaudio_conversion COMMAND miniaudio_conversion)
|
|
||||||
|
|
||||||
add_miniaudio_test(miniaudio_filtering filtering/filtering.c)
|
add_miniaudio_test(miniaudio_filtering filtering/filtering.c)
|
||||||
add_test(NAME miniaudio_filtering COMMAND miniaudio_filtering ${CMAKE_CURRENT_SOURCE_DIR}/data/16-44100-stereo.flac)
|
add_test(NAME miniaudio_filtering COMMAND miniaudio_filtering ${CMAKE_CURRENT_SOURCE_DIR}/data/16-44100-stereo.flac)
|
||||||
|
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
#define MA_NO_THREADING
|
|
||||||
#define MA_NO_DEVICE_IO
|
|
||||||
#include "../common/common.c"
|
|
||||||
|
|
||||||
ma_result init_data_converter(ma_uint32 rateIn, ma_uint32 rateOut, ma_resample_algorithm algorithm, ma_data_converter* pDataConverter)
|
|
||||||
{
|
|
||||||
ma_result result;
|
|
||||||
ma_data_converter_config config;
|
|
||||||
|
|
||||||
config = ma_data_converter_config_init(ma_format_s16, ma_format_s16, 1, 1, rateIn, rateOut);
|
|
||||||
config.resampling.algorithm = algorithm;
|
|
||||||
|
|
||||||
result = ma_data_converter_init(&config, NULL, pDataConverter);
|
|
||||||
if (result != MA_SUCCESS) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return MA_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
ma_result test_data_converter__passthrough()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
Notes:
|
|
||||||
- The isPassthrough flag should be set to true. Both the positive and negative cases need to be tested.
|
|
||||||
- ma_data_converter_set_rate() should fail with MA_INVALID_OPERATION.
|
|
||||||
- The output should be identical to the input.
|
|
||||||
*/
|
|
||||||
printf("Passthrough\n");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return MA_SUCCESS;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
int test_entry__data_converter(int argc, char** argv)
|
|
||||||
{
|
|
||||||
ma_result result;
|
|
||||||
ma_bool32 hasError = MA_FALSE;
|
|
||||||
|
|
||||||
(void)argc;
|
|
||||||
(void)argv;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
result = test_data_converter__passthrough();
|
|
||||||
if (result != MA_SUCCESS) {
|
|
||||||
hasError = MA_TRUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
(void)result;
|
|
||||||
|
|
||||||
if (hasError) {
|
|
||||||
return -1;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
|
||||||
{
|
|
||||||
ma_register_test("Data Conversion", test_entry__data_converter);
|
|
||||||
|
|
||||||
return ma_run_tests(argc, argv);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user