Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Linear volume response in VDR
Emil Naepflein wrote:
>
> 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));
> }
> }
Seems to improve the volume control.
Can you elaborate a little on the theory behind this?
An incoming Volume of 220 already leads to a result of
255.
Klaus
Home |
Main Index |
Thread Index