aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-11 07:48:30 +0200
committerMax Kellermann <max@duempel.org>2008-09-11 07:48:30 +0200
commit3aa4564b561f0afd8eae1eeee7836006baffcde8 (patch)
tree1d4208fb57b9840a8a90f418a0d7b21fc3f085c0 /src/output_control.c
parent56cf54e880359d40dae7df460b23101a4f1a77fb (diff)
downloadmpd-3aa4564b561f0afd8eae1eeee7836006baffcde8.tar.gz
mpd-3aa4564b561f0afd8eae1eeee7836006baffcde8.tar.xz
mpd-3aa4564b561f0afd8eae1eeee7836006baffcde8.zip
output: removed audio_output.sameInAndOutFormats
Eliminate sameInAndOutFormats and check with audio_format_equals() each time it this information is needed. Another 4 bytes saved.
Diffstat (limited to '')
-rw-r--r--src/output_control.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/output_control.c b/src/output_control.c
index 7e181aca2..26558d3c4 100644
--- a/src/output_control.c
+++ b/src/output_control.c
@@ -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);