views:

157

answers:

1

Hello,

I'm making a game. Now if my player goes to another level the music is still playing. Now I want to let the music fade out to let start the new music of the next level.

I use mp3 to play. With the packages: jl1.0, mp3spi1.9.4, tritonus_share-0.3.6. Oh yeah. Volume is not supported in the FloatControll class.

Sorry for my bad English: 14 years old and speaking dutch

Martijn

+2  A: 

I suppose you're trying to get Volume control instead of MasterGain. Try this:

if (line.isControlSupported(FloatControl.Type.MASTER_GAIN)) {
    masterGain = (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);
}
tulskiy
Thanks, I had to decrease the mastergain value to -80. With an interval of 0.5f
Martijn Courteaux