Sound done (SOLVED)

Hi everyone.
Recently I noticed that “sound_done” message is never triggered after sound is finished.
Here is the code, I am using:

function init(self)
	msg.post("#level_solved", "play_sound", {delay = 2})
end

function on_message(self, message_id, message, sender)
	if message_id == hash("sound_done") then
		pprint(message, sender);
	end
end

Actually even “on_message” function is not called.
What I am doing wrong?

The play_id to be returned needs to be specified:

msg.post("#level_solved", "play_sound", {delay = 2, play_id = 1})

You could also perhaps use sound.play(), which lets you specify a callback function for when the sound ends.

Although the documentation doesn’t say it, the sound.play() function returns the play_id.

I’ll use sound.play() it looks like more convenient.
Thanks!