I have a question in regards to an earlier post by OfficerRiot about changing the Volume of background Music. I have music that will play in the background of a pong game I've made, but it's so loud that you could barely hear to soundfx that I've added to the game. Is there any way to take a downloaded music track and make it quieter using Greenfoot coding?
The first line of code was me establishing the file to play in the background of my game, and the next two methods listed in the code show how I am initiating the music to play and how I'm telling it to stop, however, I don't quite know how I'm meant to make it's volume quieter, if that's even possible.
private GreenfootSound bgMusic = new GreenfootSound("Heartache.mp3"); public void act() { if(!isMusicPlaying) { bgMusic.playLoop(); isMusicPlaying = true; } } public void stopped() { bgMusic.stop(); isMusicPlaying = false; }