Commit 90b59022 authored by David Reid's avatar David Reid

Fix a bug with initialization of the encoder in audioconverter.

parent c4122feb
...@@ -301,7 +301,7 @@ int main(int argc, char** argv) ...@@ -301,7 +301,7 @@ int main(int argc, char** argv)
} }
/* Initialize the encoder for the output file. */ /* Initialize the encoder for the output file. */
encoderConfig = ma_encoder_config_init(ma_resource_format_wav, format, channels, rate); encoderConfig = ma_encoder_config_init(ma_resource_format_wav, decoder.outputFormat, decoder.outputChannels, decoder.outputSampleRate);
result = ma_encoder_init_file(pOutputFilePath, &encoderConfig, &encoder); result = ma_encoder_init_file(pOutputFilePath, &encoderConfig, &encoder);
if (result != MA_SUCCESS) { if (result != MA_SUCCESS) {
ma_decoder_uninit(&decoder); ma_decoder_uninit(&decoder);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment