output: don't initialize inAudioFormat, outAudioFormat
As long as the device isn't open, both attributes are not used. Since they will both be initialized in audio_output_open(), we do not need the initialization in audio_output_init().
This commit is contained in:
parent
19fe134b38
commit
420c879dd6
@ -89,16 +89,12 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
|
|||||||
ao->convBuffer = NULL;
|
ao->convBuffer = NULL;
|
||||||
ao->convBufferLen = 0;
|
ao->convBufferLen = 0;
|
||||||
|
|
||||||
memset(&ao->inAudioFormat, 0, sizeof(ao->inAudioFormat));
|
|
||||||
memset(&ao->outAudioFormat, 0, sizeof(ao->outAudioFormat));
|
|
||||||
memset(&ao->convState, 0, sizeof(ConvState));
|
memset(&ao->convState, 0, sizeof(ConvState));
|
||||||
|
|
||||||
if (format) {
|
if (format) {
|
||||||
if (0 != parseAudioConfig(&ao->reqAudioFormat, format)) {
|
if (0 != parseAudioConfig(&ao->reqAudioFormat, format)) {
|
||||||
FATAL("error parsing format at line %i\n", bp->line);
|
FATAL("error parsing format at line %i\n", bp->line);
|
||||||
}
|
}
|
||||||
|
|
||||||
ao->outAudioFormat = ao->reqAudioFormat;
|
|
||||||
} else
|
} else
|
||||||
audio_format_clear(&ao->reqAudioFormat);
|
audio_format_clear(&ao->reqAudioFormat);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user