Rearrange directory structure.
@@ -1,22 +1,10 @@
|
||||
examples/out/
|
||||
docs/
|
||||
debugging/
|
||||
old_stuff/
|
||||
res/
|
||||
tests/x64/
|
||||
tests/Debug/
|
||||
tests/Release/
|
||||
tests/ARM/
|
||||
tests/bin/
|
||||
_private/
|
||||
examples/build/vc15/
|
||||
examples/build/bin/
|
||||
tests/_build/bin/
|
||||
tests/_build/res/output/
|
||||
tests/_build/tcc/
|
||||
!/tests/bin/DO_NOT_DELETE
|
||||
tests/res/output/
|
||||
!/tests/res/output/DO_NOT_DELETE
|
||||
/tests/SDL2.dll
|
||||
tests/res/private/
|
||||
tests/private/
|
||||
examples/bin/
|
||||
examples/res/private/
|
||||
/examples/SDL2.dll
|
||||
tests/_build/vc15/
|
||||
tools/_build/
|
||||
*.vcxproj.user
|
||||
.vs/
|
||||
@@ -1,22 +1,8 @@
|
||||
Building
|
||||
========
|
||||
Build and run these test from this folder. Example:
|
||||
Build and run from this directory. Example:
|
||||
|
||||
clear && ./ma_build_tests_linux && ./bin/ma_test_0
|
||||
gcc ../test_deviceio.c -o bin/test_deviceio
|
||||
./bin/test_deviceio
|
||||
|
||||
These tests load resources from hard coded paths which point to the "res" folder. These
|
||||
paths are based on the assumption that the current directory is where the build files
|
||||
are located.
|
||||
|
||||
Emscripten
|
||||
----------
|
||||
On Windows, you need to move into this directory and run emsdk_env.bat from a command
|
||||
prompt using an absolute path like "C:\emsdk\emsdk_env.bat". Note that PowerShell doesn't
|
||||
work for me for some reason. Then, run the relevant batch file:
|
||||
|
||||
ma_build_tests_emscripten.bat
|
||||
|
||||
The output will be placed in the bin folder. If you have output WASM it may not work when
|
||||
running the web page locally. To test you can run with something like this:
|
||||
|
||||
emrun bin/ma_test_0_emscripten.html
|
||||
Output files will be placed in the "res/output" folder.
|
||||
|
||||
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
@@ -10,7 +10,8 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define MAX_TESTS 64
|
||||
#define MAX_TESTS 64
|
||||
#define TEST_OUTPUT_DIR "res/output"
|
||||
|
||||
typedef int (* ma_test_entry_proc)(int argc, char** argv);
|
||||
|
||||
|
||||
@@ -56,12 +56,12 @@ ma_result test_bpf2__by_format(const char* pInputFilePath, const char* pOutputFi
|
||||
|
||||
ma_result test_bpf2__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_bpf2__by_format(pInputFilePath, "output/bpf2_f32.wav", ma_format_f32);
|
||||
return test_bpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/bpf2_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_bpf2__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_bpf2__by_format(pInputFilePath, "output/bpf2_s16.wav", ma_format_s16);
|
||||
return test_bpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/bpf2_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
|
||||
@@ -117,12 +117,12 @@ ma_result test_bpf4__by_format(const char* pInputFilePath, const char* pOutputFi
|
||||
|
||||
ma_result test_bpf4__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_bpf4__by_format(pInputFilePath, "output/bpf4_f32.wav", ma_format_f32);
|
||||
return test_bpf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/bpf4_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_bpf4__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_bpf4__by_format(pInputFilePath, "output/bpf4_s16.wav", ma_format_s16);
|
||||
return test_bpf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/bpf4_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
ma_result test_dithering__u8(const char* pInputFilePath)
|
||||
{
|
||||
const char* pOutputFilePath = "output/dithering_u8.wav";
|
||||
const char* pOutputFilePath = TEST_OUTPUT_DIR"/dithering_u8.wav";
|
||||
ma_result result;
|
||||
ma_decoder_config decoderConfig;
|
||||
ma_decoder decoder;
|
||||
|
||||
@@ -56,12 +56,12 @@ ma_result test_hishelf2__by_format(const char* pInputFilePath, const char* pOutp
|
||||
|
||||
ma_result test_hishelf2__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_hishelf2__by_format(pInputFilePath, "output/hishelf2_f32.wav", ma_format_f32);
|
||||
return test_hishelf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hishelf2_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_hishelf2__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_hishelf2__by_format(pInputFilePath, "output/hishelf2_s16.wav", ma_format_s16);
|
||||
return test_hishelf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hishelf2_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -117,12 +117,12 @@ ma_result test_hishelf4__by_format(const char* pInputFilePath, const char* pOutp
|
||||
|
||||
ma_result test_hishelf4__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_hishelf4__by_format(pInputFilePath, "output/hishelf4_f32.wav", ma_format_f32);
|
||||
return test_hishelf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hishelf4_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_hishelf4__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_hishelf4__by_format(pInputFilePath, "output/hishelf4_s16.wav", ma_format_s16);
|
||||
return test_hishelf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hishelf4_s16.wav", ma_format_s16);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -56,12 +56,12 @@ ma_result test_hpf1__by_format(const char* pInputFilePath, const char* pOutputFi
|
||||
|
||||
ma_result test_hpf1__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_hpf1__by_format(pInputFilePath, "output/hpf1_f32.wav", ma_format_f32);
|
||||
return test_hpf1__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf1_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_hpf1__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_hpf1__by_format(pInputFilePath, "output/hpf1_s16.wav", ma_format_s16);
|
||||
return test_hpf1__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf1_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
|
||||
@@ -117,12 +117,12 @@ ma_result test_hpf2__by_format(const char* pInputFilePath, const char* pOutputFi
|
||||
|
||||
ma_result test_hpf2__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_hpf2__by_format(pInputFilePath, "output/hpf2_f32.wav", ma_format_f32);
|
||||
return test_hpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf2_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_hpf2__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_hpf2__by_format(pInputFilePath, "output/hpf2_s16.wav", ma_format_s16);
|
||||
return test_hpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf2_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
|
||||
@@ -178,12 +178,12 @@ ma_result test_hpf3__by_format(const char* pInputFilePath, const char* pOutputFi
|
||||
|
||||
ma_result test_hpf3__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_hpf3__by_format(pInputFilePath, "output/hpf3_f32.wav", ma_format_f32);
|
||||
return test_hpf3__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf3_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_hpf3__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_hpf3__by_format(pInputFilePath, "output/hpf3_s16.wav", ma_format_s16);
|
||||
return test_hpf3__by_format(pInputFilePath, TEST_OUTPUT_DIR"/hpf3_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -56,12 +56,12 @@ ma_result test_loshelf2__by_format(const char* pInputFilePath, const char* pOutp
|
||||
|
||||
ma_result test_loshelf2__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_loshelf2__by_format(pInputFilePath, "output/loshelf2_f32.wav", ma_format_f32);
|
||||
return test_loshelf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/loshelf2_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_loshelf2__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_loshelf2__by_format(pInputFilePath, "output/loshelf2_s16.wav", ma_format_s16);
|
||||
return test_loshelf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/loshelf2_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -117,12 +117,12 @@ ma_result test_loshelf4__by_format(const char* pInputFilePath, const char* pOutp
|
||||
|
||||
ma_result test_loshelf4__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_loshelf4__by_format(pInputFilePath, "output/loshelf4_f32.wav", ma_format_f32);
|
||||
return test_loshelf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/loshelf4_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_loshelf4__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_loshelf4__by_format(pInputFilePath, "output/loshelf4_s16.wav", ma_format_s16);
|
||||
return test_loshelf4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/loshelf4_s16.wav", ma_format_s16);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -56,12 +56,12 @@ ma_result test_lpf1__by_format(const char* pInputFilePath, const char* pOutputFi
|
||||
|
||||
ma_result test_lpf1__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_lpf1__by_format(pInputFilePath, "output/lpf1_f32.wav", ma_format_f32);
|
||||
return test_lpf1__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf1_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_lpf1__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_lpf1__by_format(pInputFilePath, "output/lpf1_s16.wav", ma_format_s16);
|
||||
return test_lpf1__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf1_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
|
||||
@@ -117,12 +117,12 @@ ma_result test_lpf2__by_format(const char* pInputFilePath, const char* pOutputFi
|
||||
|
||||
ma_result test_lpf2__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_lpf2__by_format(pInputFilePath, "output/lpf2_f32.wav", ma_format_f32);
|
||||
return test_lpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf2_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_lpf2__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_lpf2__by_format(pInputFilePath, "output/lpf2_s16.wav", ma_format_s16);
|
||||
return test_lpf2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf2_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
|
||||
@@ -179,12 +179,12 @@ ma_result test_lpf3__by_format(const char* pInputFilePath, const char* pOutputFi
|
||||
|
||||
ma_result test_lpf3__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_lpf3__by_format(pInputFilePath, "output/lpf3_f32.wav", ma_format_f32);
|
||||
return test_lpf3__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf3_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_lpf3__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_lpf3__by_format(pInputFilePath, "output/lpf3_s16.wav", ma_format_s16);
|
||||
return test_lpf3__by_format(pInputFilePath, TEST_OUTPUT_DIR"/lpf3_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -56,12 +56,12 @@ ma_result test_notch2__by_format(const char* pInputFilePath, const char* pOutput
|
||||
|
||||
ma_result test_notch2__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_notch2__by_format(pInputFilePath, "output/notch2_f32.wav", ma_format_f32);
|
||||
return test_notch2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/notch2_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_notch2__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_notch2__by_format(pInputFilePath, "output/notch2_s16.wav", ma_format_s16);
|
||||
return test_notch2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/notch2_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -117,12 +117,12 @@ ma_result test_notch4__by_format(const char* pInputFilePath, const char* pOutput
|
||||
|
||||
ma_result test_notch4__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_notch4__by_format(pInputFilePath, "output/notch4_f32.wav", ma_format_f32);
|
||||
return test_notch4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/notch4_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_notch4__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_notch4__by_format(pInputFilePath, "output/notch4_s16.wav", ma_format_s16);
|
||||
return test_notch4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/notch4_s16.wav", ma_format_s16);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -56,12 +56,12 @@ ma_result test_peak2__by_format(const char* pInputFilePath, const char* pOutputF
|
||||
|
||||
ma_result test_peak2__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_peak2__by_format(pInputFilePath, "output/peak2_f32.wav", ma_format_f32);
|
||||
return test_peak2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/peak2_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_peak2__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_peak2__by_format(pInputFilePath, "output/peak2_s16.wav", ma_format_s16);
|
||||
return test_peak2__by_format(pInputFilePath, TEST_OUTPUT_DIR"/peak2_s16.wav", ma_format_s16);
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -117,12 +117,12 @@ ma_result test_peak4__by_format(const char* pInputFilePath, const char* pOutputF
|
||||
|
||||
ma_result test_peak4__f32(const char* pInputFilePath)
|
||||
{
|
||||
return test_peak4__by_format(pInputFilePath, "output/peak4_f32.wav", ma_format_f32);
|
||||
return test_peak4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/peak4_f32.wav", ma_format_f32);
|
||||
}
|
||||
|
||||
ma_result test_peak4__s16(const char* pInputFilePath)
|
||||
{
|
||||
return test_peak4__by_format(pInputFilePath, "output/peak4_s16.wav", ma_format_s16);
|
||||
return test_peak4__by_format(pInputFilePath, TEST_OUTPUT_DIR"/peak4_s16.wav", ma_format_s16);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
ma_result test_noise__by_format_and_type(ma_format format, ma_waveform_type type, const char* pFileName)
|
||||
{
|
||||
ma_result result;
|
||||
@@ -39,17 +38,17 @@ ma_result test_noise__f32()
|
||||
ma_result result;
|
||||
ma_bool32 hasError = MA_FALSE;
|
||||
|
||||
result = test_noise__by_format_and_type(ma_format_f32, ma_noise_type_white, "output/noise_f32_white.wav");
|
||||
result = test_noise__by_format_and_type(ma_format_f32, ma_noise_type_white, TEST_OUTPUT_DIR"/noise_f32_white.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_noise__by_format_and_type(ma_format_f32, ma_noise_type_pink, "output/noise_f32_pink.wav");
|
||||
result = test_noise__by_format_and_type(ma_format_f32, ma_noise_type_pink, TEST_OUTPUT_DIR"/noise_f32_pink.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_noise__by_format_and_type(ma_format_f32, ma_noise_type_brownian, "output/noise_f32_brownian.wav");
|
||||
result = test_noise__by_format_and_type(ma_format_f32, ma_noise_type_brownian, TEST_OUTPUT_DIR"/noise_f32_brownian.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
@@ -66,17 +65,17 @@ ma_result test_noise__s16()
|
||||
ma_result result;
|
||||
ma_bool32 hasError = MA_FALSE;
|
||||
|
||||
result = test_noise__by_format_and_type(ma_format_s16, ma_noise_type_white, "output/noise_s16_white.wav");
|
||||
result = test_noise__by_format_and_type(ma_format_s16, ma_noise_type_white, TEST_OUTPUT_DIR"/output/noise_s16_white.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_noise__by_format_and_type(ma_format_s16, ma_noise_type_pink, "output/noise_s16_pink.wav");
|
||||
result = test_noise__by_format_and_type(ma_format_s16, ma_noise_type_pink, TEST_OUTPUT_DIR"/output/noise_s16_pink.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_noise__by_format_and_type(ma_format_s16, ma_noise_type_brownian, "output/noise_s16_brownian.wav");
|
||||
result = test_noise__by_format_and_type(ma_format_s16, ma_noise_type_brownian, TEST_OUTPUT_DIR"/output/noise_s16_brownian.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
@@ -93,17 +92,17 @@ ma_result test_noise__u8()
|
||||
ma_result result;
|
||||
ma_bool32 hasError = MA_FALSE;
|
||||
|
||||
result = test_noise__by_format_and_type(ma_format_u8, ma_noise_type_white, "output/noise_u8_white.wav");
|
||||
result = test_noise__by_format_and_type(ma_format_u8, ma_noise_type_white, TEST_OUTPUT_DIR"/noise_u8_white.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_noise__by_format_and_type(ma_format_u8, ma_noise_type_pink, "output/noise_u8_pink.wav");
|
||||
result = test_noise__by_format_and_type(ma_format_u8, ma_noise_type_pink, TEST_OUTPUT_DIR"/noise_u8_pink.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_noise__by_format_and_type(ma_format_u8, ma_noise_type_brownian, "output/noise_u8_brownian.wav");
|
||||
result = test_noise__by_format_and_type(ma_format_u8, ma_noise_type_brownian, TEST_OUTPUT_DIR"/noise_u8_brownian.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
@@ -46,45 +46,45 @@ ma_result test_waveform__f32()
|
||||
double amplitude = 0.2;
|
||||
|
||||
/* Sine */
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sine, +amplitude, "output/waveform_f32_sine.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sine, +amplitude, TEST_OUTPUT_DIR"/waveform_f32_sine.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sine, -amplitude, "output/waveform_f32_sine_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sine, -amplitude, TEST_OUTPUT_DIR"/waveform_f32_sine_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
/* Square */
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_square, +amplitude, "output/waveform_f32_square.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_square, +amplitude, TEST_OUTPUT_DIR"/waveform_f32_square.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_square, -amplitude, "output/waveform_f32_square_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_square, -amplitude, TEST_OUTPUT_DIR"/waveform_f32_square_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
/* Triangle */
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_triangle, +amplitude, "output/waveform_f32_triangle.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_triangle, +amplitude, TEST_OUTPUT_DIR"/waveform_f32_triangle.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_triangle, -amplitude, "output/waveform_f32_triangle_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_triangle, -amplitude, TEST_OUTPUT_DIR"/waveform_f32_triangle_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
/* Sawtooth */
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sawtooth, +amplitude, "output/waveform_f32_sawtooth.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sawtooth, +amplitude, TEST_OUTPUT_DIR"/waveform_f32_sawtooth.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sawtooth, -amplitude, "output/waveform_f32_sawtooth_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_f32, ma_waveform_type_sawtooth, -amplitude, TEST_OUTPUT_DIR"/waveform_f32_sawtooth_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
@@ -104,45 +104,45 @@ ma_result test_waveform__s16()
|
||||
double amplitude = 0.2;
|
||||
|
||||
/* Sine */
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sine, +amplitude, "output/waveform_s16_sine.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sine, +amplitude, TEST_OUTPUT_DIR"/waveform_s16_sine.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sine, -amplitude, "output/waveform_s16_sine_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sine, -amplitude, TEST_OUTPUT_DIR"/waveform_s16_sine_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
/* Square */
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_square, +amplitude, "output/waveform_s16_square.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_square, +amplitude, TEST_OUTPUT_DIR"/waveform_s16_square.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_square, -amplitude, "output/waveform_s16_square_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_square, -amplitude, TEST_OUTPUT_DIR"/waveform_s16_square_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
/* Triangle */
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_triangle, +amplitude, "output/waveform_s16_triangle.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_triangle, +amplitude, TEST_OUTPUT_DIR"/waveform_s16_triangle.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_triangle, -amplitude, "output/waveform_s16_triangle_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_triangle, -amplitude, TEST_OUTPUT_DIR"/waveform_s16_triangle_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
/* Sawtooth */
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sawtooth, +amplitude, "output/waveform_s16_sawtooth.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sawtooth, +amplitude, TEST_OUTPUT_DIR"/waveform_s16_sawtooth.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sawtooth, -amplitude, "output/waveform_s16_sawtooth_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_s16, ma_waveform_type_sawtooth, -amplitude, TEST_OUTPUT_DIR"/waveform_s16_sawtooth_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
@@ -162,45 +162,45 @@ ma_result test_waveform__u8()
|
||||
double amplitude = 0.2;
|
||||
|
||||
/* Sine */
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sine, +amplitude, "output/waveform_u8_sine.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sine, +amplitude, TEST_OUTPUT_DIR"/waveform_u8_sine.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sine, -amplitude, "output/waveform_u8_sine_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sine, -amplitude, TEST_OUTPUT_DIR"/waveform_u8_sine_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
/* Square */
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_square, +amplitude, "output/waveform_u8_square.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_square, +amplitude, TEST_OUTPUT_DIR"/waveform_u8_square.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_square, -amplitude, "output/waveform_u8_square_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_square, -amplitude, TEST_OUTPUT_DIR"/waveform_u8_square_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
/* Triangle */
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_triangle, +amplitude, "output/waveform_u8_triangle.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_triangle, +amplitude, TEST_OUTPUT_DIR"/waveform_u8_triangle.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_triangle, -amplitude, "output/waveform_u8_triangle_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_triangle, -amplitude, TEST_OUTPUT_DIR"/waveform_u8_triangle_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
/* Sawtooth */
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sawtooth, +amplitude, "output/waveform_u8_sawtooth.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sawtooth, +amplitude, TEST_OUTPUT_DIR"/waveform_u8_sawtooth.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sawtooth, -amplitude, "output/waveform_u8_sawtooth_neg.wav");
|
||||
result = test_waveform__by_format_and_type(ma_format_u8, ma_waveform_type_sawtooth, -amplitude, TEST_OUTPUT_DIR"/waveform_u8_sawtooth_neg.wav");
|
||||
if (result != MA_SUCCESS) {
|
||||
hasError = MA_TRUE;
|
||||
}
|
||||
|
||||