Another sound problem, although not a glitching one.
Sorry if this is a very nooby question. I can't get sound queuing to work properly.
This works:
As expected, it plays 1.mp3, then 2.mp3, then repeats.
But this doesn't work:
No sound is played at all
Also, this doesn't play any sound either:
But this does:
I've also tried using the $ renpy.sound.queue() function, and it doesn't seem to work at all.
What does seem to work, is this:
Code: Select all
queue sound "1.mp3"
e "Sound 1 started"
queue sound "2.mp3"
e "Sound 2 will play next"
queue sound "3.mp3"
e "And sound 3"
But I want to do something like this:
Code: Select all
queue sound ["1.mp3", "2.mp3", "3.mp3"]
e "Sound 1 started"
e "Sound 2 will play next"
e "And sound 3 afterwards"
However, that plays no sound at all. What is the correct method to setup the sound queue, so that the sounds actually play? I'm probably missing something obvious...
I also tried this variation:
Code: Select all
queue sound "1.mp3"
queue sound "2.mp3"
queue sound "3.mp3"
e "Sound 1 started"
e "Sound 2 will play next"
e "And sound 3 afterwards"
But only the 3rd sound was played. I understand this is (probably) because the "queue sound" statement clears the sound queue each time (with renpy.sound.queue's default "clear_queue" parameter value of True), but it is a bit counterintuitive.
EDIT: I have another sound question, but I don't want to double post.
Will Ren'Py support looping sound effect channels in the future?
I've figured out you can use the music channel to loop sound effects, but this means that your looping sound effect sound level will change when the user sets the music volume. Also, I want to set my music volume lower globally, but don't want that to affect the looping sound effects.
Should I use the "renpy.sound.set_queue_empty_callback()" function instead?
EDIT 2: Another update on the sound glitches.
Looks like there are also a few glitches if renpy code sets the music volume lower (at start of the game), and then later fades music (eg: for 1 s), while playing sound effects. This is with both the music and the sound effects being 44,100 hz mp3s.
Should I try converting all my sounds and music to 44,100 hz oggs? It seems like oggs might have less glitches (when it comes to fading out music). But they might also have problems with "non-integer frame endings" that PyTom mentioned earlier.