Cant seem to find out how to get the Sound File ID from a SoundInformation file. The only way to turn it off is with = void stopSound(int soundID but I cant to find out how to get the soundID number.
Get Sound ID?
-
- English
- angriff
- Thread is marked as Resolved.
-
-
Guess I should have looked around a little more.. It is sort of different than I thought
int id = player.playSound(<soundinfofiletag>);
-
Just a small info about the SoundInformation: Basically this is just the abstract representation of the sound file, it does not have an ID or something like that. Only if you play the file, an actual sound instance is created (so the "playSound()" function returns this ID).
It's recommendable to create a "SoundInformation" object only once btw and reuse it everytime you need it for a player For example:Java -
-
just sent you a crash if you exit when the sound file is running too.
It's unfortunately the same crash that happens when calling "stopSound()" manually. This bug will be fixed with the next update
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!