Mercurial > hg > dmlib
comparison jssplr.c @ 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 | a33e47232161 |
children | 8ac24d753304 |
comparison
equal
deleted
inserted
replaced
134:1ba202b448e0 | 135:ff0fe1d1ab3d |
---|---|
118 | 118 |
119 if (volume < mpMinVol) volume = mpMinVol; else | 119 if (volume < mpMinVol) volume = mpMinVol; else |
120 if (volume > mpMaxVol) volume = mpMaxVol; | 120 if (volume > mpMaxVol) volume = mpMaxVol; |
121 | 121 |
122 //fprintf(stderr, "chn %d: vol=%d, fad=%d, env=%d\n", channel, volume, chn->iCFadeOutVol, chn->iCVolEnv); | 122 //fprintf(stderr, "chn %d: vol=%d, fad=%d, env=%d\n", channel, volume, chn->iCFadeOutVol, chn->iCVolEnv); |
123 | 123 /* |
124 jvmSetVolume(mp->device, channel, | 124 jvmSetVolume(mp->device, channel, |
125 (chn->iCFadeOutVol * chn->iCVolEnv * volume) / (16 * 65536)); | |
126 */ | |
127 jvmSetVolumeRamp(mp->device, channel, jvmGetVolume(mp->device, channel), | |
125 (chn->iCFadeOutVol * chn->iCVolEnv * volume) / (16 * 65536)); | 128 (chn->iCFadeOutVol * chn->iCVolEnv * volume) / (16 * 65536)); |
126 } | 129 } |
127 | 130 |
128 | 131 |
129 static void jmpCSetPanning(JSSPlayer * mp, JSSPlayerChannel *chn, int channel, int panning) | 132 static void jmpCSetPanning(JSSPlayer * mp, JSSPlayerChannel *chn, int channel, int panning) |