aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-24 07:21:58 +0200
committerMax Kellermann <max@duempel.org>2008-09-24 07:21:58 +0200
commit6bbea44e91dd954a32915f824eaa28dfbf4d97d7 (patch)
tree8c553fdc5946ff1ebc9b378514a8ad5808d8c81a
parent5cf62133444d5a66791dbf5975484cf4de40eda8 (diff)
downloadmpd-6bbea44e91dd954a32915f824eaa28dfbf4d97d7.tar.gz
mpd-6bbea44e91dd954a32915f824eaa28dfbf4d97d7.tar.xz
mpd-6bbea44e91dd954a32915f824eaa28dfbf4d97d7.zip
output: call send_tag() only if device is on
Why send tags to a device which isn't enabled?
Diffstat (limited to '')
-rw-r--r--src/audio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/audio.c b/src/audio.c
index 7917ca526..f3de2285e 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -396,9 +396,9 @@ void sendMetadataToAudioDevice(const struct tag *tag)
{
unsigned int i;
- for (i = 0; i < audioOutputArraySize; ++i) {
- audio_output_send_tag(&audioOutputArray[i], tag);
- }
+ for (i = 0; i < audioOutputArraySize; ++i)
+ if (audioDeviceStates[i] == DEVICE_ON)
+ audio_output_send_tag(&audioOutputArray[i], tag);
}
int enableAudioDevice(unsigned int device)