]> git.tuebingen.mpg.de Git - paraslash.git/commit
mixer: Implement non-linear time scale for fading.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 30 Dec 2016 22:25:11 +0000 (23:25 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 1 Apr 2017 10:48:50 +0000 (12:48 +0200)
commitbd374f0948c77dd91287f73f7573bf59f3fb5666
tree476872f6d6848b1ce5032b55652e07c373f7fbf2
parentc37b0175de9a871649074c9e08681dd6511102e9
mixer: Implement non-linear time scale for fading.

For some sound hardware, changing the volume channel has little
effect for small values but even an increment by one is audible for
high values. For such hardware it is desirable to scale the volume
in a non-linear way.

This patch implements this feature. The new --fade-exponent receives
an argument to control the level of non-linearity. The default value
of zero results in old behavior: linear scaling.

For the implementation we need to compute (the inverse of) t ->
t^alpha, where alpha is between zero and one. This requires the use
of exp(3) and log(3), so we need to include <math.h> and link with -lm.
Makefile.real
m4/lls/mixer.suite.m4
mixer.c