Sound handling in (game) application
As my previous question did not receive any answers, I'll try to rephrase it.
I need to change the volume of sounds during the game (changing pitch would be nice too). I tried to use:
double currentVolume, volumeGain=.01, newVolume;
FloatControl gainControl = (FloatControl)clipP1.getControl(FloatControl.Type.MASTER_GAIN);
currentVolume=Math.log(gainControl.getValue())*Math.log(10.0)/20.0;
newVolume = currentVolume + volumeGain;
gainControl.setValue((float)(Math.log(newVolume)/Math.log(10.0)*20.0));
The volume increase/decrease itself worked, but it was always delayed about 0.4-1.0 seconds. That is not acceptable.
Any workarounds or do I have to use another library to achieve this?
Thank You!

