Few more problems with minim.
1. I'm programming a game and I wanna mute music when player loses. I have 2 audio files playing so my function looks like this:
- void muteMusic() {
- song1.close();
- song2.close();
- }
- boolean endm=false;
- void lose() {
- if(endm==false){
- muteMusic();
- endm=true;
- }
- }
2. How to change volume of an Audio file. I tried setVolume() and setGain(), but it didn't work
3. How to pause an audio file and then resume it?