From 5b134cb23e2d94ba687092abd12a0240751daff6 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 19 Dec 2022 15:13:56 +0100 Subject: [PATCH] Fixed restoring the volume at program start --- CONTRIBUTORS | 1 + HISTORY | 3 ++- vdr.c | 8 +++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 5ca7e14d..b392c2d0 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3381,6 +3381,7 @@ Matthias Senzel when Flush() was called for reporting that if an error occurs while recording, the respective entry in the list of recordings was not updated immediately + for fixing restoring the volume at program start Marek Nazarko for translating OSD texts to the Polish language diff --git a/HISTORY b/HISTORY index d3b7440b..e6e2fdcc 100644 --- a/HISTORY +++ b/HISTORY @@ -9833,6 +9833,7 @@ Video Disk Recorder Revision History - Avoiding a zero sized array in cDevice::GetDevice() (thanks to Marko Mäkelä). - Now checking the video directory after setting the user id. -2022-12-16: +2022-12-19: - Updated the Italian OSD texts (thanks to Diego Pierotto). +- Fixed restoring the volume at program start (thanks to Matthias Senzel). diff --git a/vdr.c b/vdr.c index debe8ce9..1bdc51ab 100644 --- a/vdr.c +++ b/vdr.c @@ -22,7 +22,7 @@ * * The project's page is at http://www.tvdr.de * - * $Id: vdr.c 5.11 2022/12/12 10:27:38 kls Exp $ + * $Id: vdr.c 5.12 2022/12/19 15:13:56 kls Exp $ */ #include @@ -917,10 +917,12 @@ int main(int argc, char *argv[]) LOCK_CHANNELS_READ; Channels->SwitchTo(Setup.CurrentChannel); } + + // Restore volume: + + cDevice::PrimaryDevice()->SetVolume(Setup.CurrentVolume, true); if (MuteAudio) cDevice::PrimaryDevice()->ToggleMute(); - else - cDevice::PrimaryDevice()->SetVolume(Setup.CurrentVolume, true); // Signal handlers: