mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Making sure the "Mute" and "Volume+/-" keys don't interfere with digital audio
This commit is contained in:
parent
506eb479a5
commit
20b213201a
1
HISTORY
1
HISTORY
@ -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.
|
||||
|
5
device.c
5
device.c
@ -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);
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user