Commit 3aa4564b authored by Max Kellermann's avatar Max Kellermann

output: removed audio_output.sameInAndOutFormats

Eliminate sameInAndOutFormats and check with audio_format_equals() each time it this information is needed. Another 4 bytes saved.
parent 56cf54e8
......@@ -66,7 +66,6 @@ struct audio_output {
ConvState convState;
char *convBuffer;
size_t convBufferLen;
int sameInAndOutFormats;
void *data;
};
......
......@@ -44,10 +44,6 @@ int audio_output_open(struct audio_output *audioOutput,
if (!audioOutput->open)
ret = audioOutput->plugin->open(audioOutput);
audioOutput->sameInAndOutFormats =
audio_format_equals(&audioOutput->inAudioFormat,
&audioOutput->outAudioFormat);
return ret;
}
......@@ -82,9 +78,9 @@ int audio_output_play(struct audio_output *audioOutput,
if (!audioOutput->open)
return -1;
if (!audioOutput->sameInAndOutFormats) {
if (!audio_format_equals(&audioOutput->inAudioFormat,
&audioOutput->outAudioFormat))
convertAudioFormat(audioOutput, &playChunk, &size);
}
ret = audioOutput->plugin->play(audioOutput, playChunk, size);
......
......@@ -86,7 +86,6 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
ao->plugin = plugin;
ao->open = 0;
ao->sameInAndOutFormats = 0;
ao->convBuffer = NULL;
ao->convBufferLen = 0;
......
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