onFinish

.onFinish() { ... }

This allows you to set an event to be run when this sound finishes playing. The event is the block attached.

sound = new Sound( 'my_sound.mp3' )

sound.onFinish() do
    // work to be done when finish playing
end

sound.play()

The onFinish event is only run once, and calling this again will replace the event with a new one. Calling this without a block will clear the onFinish event.