Add support for Brownian noise.

This commit is contained in:
David Reid
2020-02-25 19:07:50 +10:00
parent 8c96ca4c55
commit 479d36c2a1
2 changed files with 124 additions and 2 deletions
@@ -49,6 +49,11 @@ ma_result test_noise__f32()
hasError = MA_TRUE;
}
result = test_noise__by_format_and_type(ma_format_f32, ma_noise_type_brownian, "output/noise_f32_brownian.wav");
if (result != MA_SUCCESS) {
hasError = MA_TRUE;
}
if (hasError) {
return MA_ERROR;
} else {
@@ -66,6 +71,16 @@ ma_result test_noise__s16()
hasError = MA_TRUE;
}
result = test_noise__by_format_and_type(ma_format_s16, ma_noise_type_pink, "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");
if (result != MA_SUCCESS) {
hasError = MA_TRUE;
}
if (hasError) {
return MA_ERROR;
} else {
@@ -83,6 +98,16 @@ ma_result test_noise__u8()
hasError = MA_TRUE;
}
result = test_noise__by_format_and_type(ma_format_u8, ma_noise_type_pink, "output/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");
if (result != MA_SUCCESS) {
hasError = MA_TRUE;
}
if (hasError) {
return MA_ERROR;
} else {