diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-02-06 12:31:36 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-02-06 12:31:36 +0100 |
commit | 20b213201a897e5a6d88fb889cc44865d07dfb57 (patch) | |
tree | c40c8d124517a81e38109ec707bb73fddd3d9ac3 | |
parent | 506eb479a567ef00b4c2a332007ba3e03cbe21ef (diff) | |
download | vdr-20b213201a897e5a6d88fb889cc44865d07dfb57.tar.gz vdr-20b213201a897e5a6d88fb889cc44865d07dfb57.tar.bz2 |
Making sure the "Mute" and "Volume+/-" keys don't interfere with digital audio
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | device.c | 5 | ||||
-rw-r--r-- | dvbdevice.c | 6 |
3 files changed, 8 insertions, 4 deletions
@@ -3366,3 +3366,4 @@ Video Disk Recorder Revision History replay of a recording that has no Dolby Digital audio after switching to a channel that has DD and selecting the DD audio track). - Removed 'flags' from tTrackId (thought we would need this, but apparently we don't). +- Making sure the "Mute" and "Volume+/-" keys don't interfere with digital audio. @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.83 2005/02/06 11:43:20 kls Exp $ + * $Id: device.c 1.84 2005/02/06 12:30:01 kls Exp $ */ #include "device.h" @@ -646,6 +646,7 @@ void cDevice::ClrAvailableTracks(bool DescriptionsOnly) memset(availableTracks, 0, sizeof(availableTracks)); pre_1_3_19_PrivateStream = false; SetAudioChannel(0); // fall back to stereo + currentAudioTrackMissingCount = 0; } } @@ -721,7 +722,7 @@ void cDevice::EnsureAudioTrack(bool Force) } // Make sure we're set to an available audio track: const tTrackId *Track = GetTrack(GetCurrentAudioTrack()); - if (!Track || !Track->id || PreferredTrack != GetCurrentAudioTrack()) { + if (Force || !Track || !Track->id || PreferredTrack != GetCurrentAudioTrack()) { dsyslog("setting audio track to %d", PreferredTrack); SetCurrentAudioTrack(PreferredTrack); } diff --git a/dvbdevice.c b/dvbdevice.c index e8862cb4..269c0a29 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.116 2005/01/16 12:05:13 kls Exp $ + * $Id: dvbdevice.c 1.117 2005/02/06 12:30:14 kls Exp $ */ #include "dvbdevice.h" @@ -842,6 +842,8 @@ void cDvbDevice::SetAudioChannelDevice(int AudioChannel) void cDvbDevice::SetVolumeDevice(int Volume) { if (HasDecoder()) { + if (digitalAudio) + Volume = 0; audio_mixer_t am; // conversion for linear volume response: am.volume_left = am.volume_right = 2 * Volume - Volume * Volume / 255; @@ -854,8 +856,8 @@ void cDvbDevice::SetDigitalAudioDevice(bool On) if (digitalAudio != On) { if (digitalAudio) cCondWait::SleepMs(1000); // Wait until any leftover digital data has been flushed - SetVolumeDevice(On || IsMute() ? 0 : CurrentVolume()); digitalAudio = On; + SetVolumeDevice(On || IsMute() ? 0 : CurrentVolume()); } } |