I have the following code.
FloatControl volumeControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);
// Set the value to modify by in decibels
volumeControl.setValue(float volume);
Get minimum modification value in decibels (e.g. -80)
volumeControl.getMinimum();
Get maximum modification value in decibels (e.g. 6)
volumeControl.getMaximum();
I have a float
called volume
, which ranges from -1f (sound completely off) to +1f (200% volume).
How do I convert volume
to the number of decibels to modify the volumeControl
by?