Hi, I’m loading 2 music files (loader.loadMusic) and i want to play them at the same time. What happends is when i play the second one the first one stop. What can i do to play both files at the same time, maybe some setting?
Thanks!
Hi, I’m loading 2 music files (loader.loadMusic) and i want to play them at the same time. What happends is when i play the second one the first one stop. What can i do to play both files at the same time, maybe some setting?
Thanks!
Can you show your code?
Sure,
mySound1 = loader.loadMusic('mymusic1.ogg')
mySound2 = loader.loadMusic('mymusic2.ogg')
mySound1.play()
mySound2.play()
The default musicManager as defined in showBase is set to only play one music file at a time. To be able to play more music files at once you have to set the desired amount using:
base.musicManager.setConcurrentSoundLimit(2)
(where 2 is the new maximum of simultaneously played music files)
Great! thank you very much wolf!!