Sound effects can be triggered by sending an event:
def on_button_pressed(self, event, signal): signal(PlaySound(sound=ppb.Sound('toot.ogg')))
Both Ogg/Vorbis and WAV are supported audio formats.
As is usual with assets, you should instantiate your
as soon as possible, such as at the class level.
PyGame has fairly limited codec support. “Complex WAVE files” are not supported. Ogg/Opus appears to be unsupported. Additional formats and codecs might be supported but undocumented.