mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Fix memory leaks in tests.
This commit is contained in:
@@ -49,6 +49,7 @@ ma_result test_bpf2__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -109,6 +110,7 @@ ma_result test_bpf4__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ ma_result test_dithering__u8(const char* pInputFilePath)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ ma_result test_hpf1__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -109,6 +110,7 @@ ma_result test_hpf2__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -169,6 +171,7 @@ ma_result test_hpf3__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ ma_result test_loshelf2__by_format(const char* pInputFilePath, const char* pOutp
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
loshelfConfig = ma_loshelf2_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 6, 1, 1000);
|
loshelfConfig = ma_loshelf2_config_init(decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate, 6, 1, 200);
|
||||||
result = ma_loshelf2_init(&loshelfConfig, &loshelf);
|
result = ma_loshelf2_init(&loshelfConfig, &loshelf);
|
||||||
if (result != MA_SUCCESS) {
|
if (result != MA_SUCCESS) {
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
@@ -49,6 +49,7 @@ ma_result test_loshelf2__by_format(const char* pInputFilePath, const char* pOutp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -109,6 +110,7 @@ ma_result test_loshelf4__by_format(const char* pInputFilePath, const char* pOutp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ ma_result test_lpf1__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -109,6 +110,7 @@ ma_result test_lpf2__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -170,6 +172,7 @@ ma_result test_lpf3__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ ma_result test_notch2__by_format(const char* pInputFilePath, const char* pOutput
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -109,6 +110,7 @@ ma_result test_notch4__by_format(const char* pInputFilePath, const char* pOutput
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ ma_result test_peak2__by_format(const char* pInputFilePath, const char* pOutputF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -109,6 +110,7 @@ ma_result test_peak4__by_format(const char* pInputFilePath, const char* pOutputF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user