Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Linear volume response in VDR
Hi,
the volume control in vdr is not linear. The following patch makes the
volume control better:
--- dvbdevice.c.org 2004-09-25 14:15:45.000000000 +0200
+++ dvbdevice.c 2004-09-25 14:18:33.000000000 +0200
@@ -786,7 +820,12 @@
{
if (HasDecoder()) {
audio_mixer_t am;
- am.volume_left = am.volume_right = Volume;
+ int i, Vol;
+
+ for (i = 1, Vol = 0; i < Volume; i++)
+ Vol += (256 - i) * (256 - i);
+
+ am.volume_left = am.volume_right = Vol / 21718;
CHECK(ioctl(fd_audio, AUDIO_SET_MIXER, &am));
}
}
The line numbers may be wrong.
Enjoy,
Emil
Home |
Main Index |
Thread Index