-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPF.Media.Sounds supporting looping of audiostreamrandomiser? #15
Comments
Thanks for opening this issue! There were some challenges with getting loops to behave "MPF style" in GMC, and I set that work aside to finish out other features. I've been thinking on it and your notes here have given me an idea on how to implement loops in a better way, so I'll keep you updated with how it goes! |
Thank you @avanwinkle, for the update. would it be an option to use the same approach as in _on_loop until overwritten by a state change? PS: my machine configuration is on: https://github.com/DorusvdLinden/PortalPinball-V4.0 |
That's a curious error, because AudioStreamRandomizer inherits from AudioStream, as do AudioStreamOggVorbis and AudioStreamMP3, but the randomizer does not inherit from either of those so it shouldn't be entering this code block if There's an argument to be made for always doing the manual looping instead of relying on the Ogg/MP3/Wav built-in method, but I'll investigate a little more first. |
Okay, my bad. I had a shorthand in the condition that was always returning true and trying to treat the resource as an Ogg/Wav. Fixed that and verified that AudioStreamRandomizer now can loop indefinitely. |
Great to hear. I will test it in the weekend. Thank you for the fast response. Ps: I really like the new setup. |
Thank you so much, the loop: -1 now also works. |
Dear all,
I love the new setup, but i have one issue:
In my previous iteration I was looping multiple sounds in attract mode randomly, to create a dynamic background.
Now in Godot, the individual wav files can loop, but the audiostreamrandomiser stops after 1 sound played.
Using loops: -1, 3 or true gives an error in the MPF.Media.Sounds code (GMCChannel.gd) in mpf-gmc/scripts/)
code:
without the loops it runs fine.
Could be my mistake.
Kind regards
Dorus
The text was updated successfully, but these errors were encountered: