Mercurial > hg > dmlib
changeset 135:ff0fe1d1ab3d
Implement using of volume ramps in the player code. This MAY or MAY NOT be
correct, as we are setting the new value as the current value and target as
the new value. Needs to be tested / verified against FT2 .. did it this way
because it was easiest (no need to compute future values by peeking upcoming
data.)
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 05 Oct 2012 02:49:13 +0300 |
parents | 1ba202b448e0 |
children | 8ac24d753304 |
files | jssplr.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/jssplr.c Fri Oct 05 02:47:36 2012 +0300 +++ b/jssplr.c Fri Oct 05 02:49:13 2012 +0300 @@ -120,9 +120,12 @@ if (volume > mpMaxVol) volume = mpMaxVol; //fprintf(stderr, "chn %d: vol=%d, fad=%d, env=%d\n", channel, volume, chn->iCFadeOutVol, chn->iCVolEnv); - +/* jvmSetVolume(mp->device, channel, (chn->iCFadeOutVol * chn->iCVolEnv * volume) / (16 * 65536)); +*/ + jvmSetVolumeRamp(mp->device, channel, jvmGetVolume(mp->device, channel), + (chn->iCFadeOutVol * chn->iCVolEnv * volume) / (16 * 65536)); }