diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2005-05-29 19:19:20 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2005-05-29 19:19:20 +0000 |
commit | 2219e6917e9c145528de864b427124a32073533b (patch) | |
tree | aae3a85df464b61be0e5bad7eef97576c4695752 | |
parent | 986a0ffc2410b820a3389074e6f0c27a7b8dcffe (diff) | |
download | mpd-2219e6917e9c145528de864b427124a32073533b.tar.gz mpd-2219e6917e9c145528de864b427124a32073533b.tar.xz mpd-2219e6917e9c145528de864b427124a32073533b.zip |
forgot to parse the format string of audio_output's
git-svn-id: https://svn.musicpd.org/mpd/trunk@3296 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r-- | src/audioOutput.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/audioOutput.c b/src/audioOutput.c index 632d1b8dc..9bf13aa13 100644 --- a/src/audioOutput.c +++ b/src/audioOutput.c @@ -54,6 +54,7 @@ AudioOutput * newAudioOutput(ConfigParam * param) { if(param) { getBlockParam(AUDIO_OUTPUT_NAME, name, 1); getBlockParam(AUDIO_OUTPUT_TYPE, type, 1); + getBlockParam(AUDIO_OUTPUT_FORMAT, format, 1); if(!findInList(audioOutputPluginList, type, &data)) { ERROR("couldn't find audio output plugin for type " @@ -63,17 +64,6 @@ AudioOutput * newAudioOutput(ConfigParam * param) { } plugin = (AudioOutputPlugin *) data; - - if(format) { - ret->convertAudioFormat = 1; - - if(0 != parseAudioConfig(&ret->reqAudioFormat, format)) - { - ERROR("error parsing format at line %i\n", - bp->line); - exit(EXIT_FAILURE); - } - } } else { ListNode * node = audioOutputPluginList->firstNode; @@ -126,6 +116,19 @@ AudioOutput * newAudioOutput(ConfigParam * param) { memset(&ret->outAudioFormat, 0, sizeof(AudioFormat)); memset(&ret->reqAudioFormat, 0, sizeof(AudioFormat)); + if(format) { + ret->convertAudioFormat = 1; + + if(0 != parseAudioConfig(&ret->reqAudioFormat, format)) + { + ERROR("error parsing format at line %i\n", + bp->line); + exit(EXIT_FAILURE); + } + + copyAudioFormat(&ret->outAudioFormat, &ret->reqAudioFormat); + } + if(plugin->initDriverFunc(ret, param) != 0) { free(ret); ret = NULL; |