diff -ruN vdr-2.1.4_28/config.c vdr-2.1.4_29/config.c --- vdr-2.1.4_28/config.c 2014-01-26 14:55:48.301787093 +0100 +++ vdr-2.1.4_29/config.c 2014-01-26 14:57:30.108611920 +0100 @@ -482,6 +482,8 @@ PauseLastMark = 0; CurrentChannel = -1; CurrentVolume = MAXVOLUME; + VolumeSteps = 51; + VolumeLinearize = 0; CurrentDolby = 0; InitialChannel = ""; DeviceBondings = ""; @@ -704,6 +706,8 @@ else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value); else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value); else if (!strcasecmp(Name, "InitialChannel")) InitialChannel = Value; + else if (!strcasecmp(Name, "VolumeSteps")) VolumeSteps = atoi(Value); + else if (!strcasecmp(Name, "VolumeLinearize")) VolumeLinearize = atoi(Value); else if (!strcasecmp(Name, "InitialVolume")) InitialVolume = atoi(Value); else if (!strcasecmp(Name, "DeviceBondings")) DeviceBondings = Value; else if (!strcasecmp(Name, "ChannelsWrap")) ChannelsWrap = atoi(Value); @@ -828,6 +832,8 @@ Store("CurrentVolume", CurrentVolume); Store("CurrentDolby", CurrentDolby); Store("InitialChannel", InitialChannel); + Store("VolumeSteps", VolumeSteps); + Store("VolumeLinearize", VolumeLinearize); Store("InitialVolume", InitialVolume); Store("DeviceBondings", DeviceBondings); Store("ChannelsWrap", ChannelsWrap); diff -ruN vdr-2.1.4_28/config.h vdr-2.1.4_29/config.h --- vdr-2.1.4_28/config.h 2014-01-26 14:55:48.301787093 +0100 +++ vdr-2.1.4_29/config.h 2014-01-26 14:57:30.108611920 +0100 @@ -351,6 +351,8 @@ int PauseLastMark; int CurrentChannel; int CurrentVolume; + int VolumeSteps; + int VolumeLinearize; int CurrentDolby; int InitialVolume; int ChannelsWrap; diff -ruN vdr-2.1.4_28/device.c vdr-2.1.4_29/device.c --- vdr-2.1.4_28/device.c 2014-01-26 14:55:48.177793396 +0100 +++ vdr-2.1.4_29/device.c 2014-01-26 14:57:30.112611716 +0100 @@ -11,6 +11,7 @@ #include #include #include +#include #include "audio.h" #include "channels.h" #include "i18n.h" @@ -931,8 +932,9 @@ void cDevice::SetVolume(int Volume, bool Absolute) { int OldVolume = volume; - volume = constrain(Absolute ? Volume : volume + Volume, 0, MAXVOLUME); - SetVolumeDevice(volume); + float VolumeDelta = (float)MAXVOLUME/Setup.VolumeSteps; + volume = min(max((int)(floor((Absolute ? Volume : volume + Volume)/VolumeDelta+0.5)*VolumeDelta), 0), MAXVOLUME); + SetVolumeDevice((int)(pow((float)volume/MAXVOLUME, log((Setup.VolumeLinearize+20)/40.0)/log(0.5))*MAXVOLUME)); Absolute |= mute; cStatus::MsgSetVolume(Absolute ? volume : volume - OldVolume, Absolute); if (volume > 0) { diff -ruN vdr-2.1.4_28/device.h vdr-2.1.4_29/device.h --- vdr-2.1.4_28/device.h 2014-01-26 14:55:48.029800919 +0100 +++ vdr-2.1.4_29/device.h 2014-01-26 14:57:30.112611716 +0100 @@ -30,7 +30,7 @@ #define MAXPIDHANDLES 64 // the maximum number of different PIDs per device #define MAXRECEIVERS 16 // the maximum number of receivers per device #define MAXVOLUME 255 -#define VOLUMEDELTA 5 // used to increase/decrease the volume +#define VOLUMEDELTA (MAXVOLUME/Setup.VolumeSteps) // used to increase/decrease the volume #define MAXOCCUPIEDTIMEOUT 99 // max. time (in seconds) a device may be occupied enum eSetChannelResult { scrOk, scrNotAvailable, scrNoTransfer, scrFailed }; diff -ruN vdr-2.1.4_28/menu.c vdr-2.1.4_29/menu.c --- vdr-2.1.4_28/menu.c 2014-01-26 14:55:48.309786686 +0100 +++ vdr-2.1.4_29/menu.c 2014-01-26 14:57:30.116611513 +0100 @@ -3662,6 +3662,8 @@ Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Remote control repeat delta (ms)"), &data.RcRepeatDelta, 0)); Add(new cMenuEditChanItem(tr("Setup.Miscellaneous$Initial channel"), &data.InitialChannel, tr("Setup.Miscellaneous$as before"))); Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Initial volume"), &data.InitialVolume, -1, 255, tr("Setup.Miscellaneous$as before"))); + Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Volume steps"), &data.VolumeSteps, 5, 255)); + Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Volume linearize"), &data.VolumeLinearize, -20, 20)); Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Channels wrap"), &data.ChannelsWrap)); Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Show channel names with source"), &data.ShowChannelNamesWithSource)); Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Emergency exit"), &data.EmergencyExit)); diff -ruN vdr-2.1.4_28/po/de_DE.po vdr-2.1.4_29/po/de_DE.po --- vdr-2.1.4_28/po/de_DE.po 2014-01-26 14:55:48.309786686 +0100 +++ vdr-2.1.4_29/po/de_DE.po 2014-01-26 14:57:30.120611310 +0100 @@ -1240,6 +1240,12 @@ msgid "Setup.Miscellaneous$SVDRP timeout (s)" msgstr "SVDRP trennen bei Inaktivität (s)" +msgid "Setup.Miscellaneous$Volume steps" +msgstr "Anzahl Lautstärke Schritte" + +msgid "Setup.Miscellaneous$Volume linearize" +msgstr "Lautstärke Kurve korrigieren" + msgid "Setup.Miscellaneous$Zap timeout (s)" msgstr "Mindestzeit für Kanalhistorie (s)"