Handling sounds (gain, is_playing etc)

Hey there.

Are there any ways (manual didn’t help) for controlling souds?

Is there a “sound.is_playing(”#sound")"?
is there a "sound.set_gain(volume)?

Defold’s sound features are pretty minimal. There is a set_gain message and a set_group_gain function, but no is_playing().

You probably know there’s Sergey’s OpenAL extension if you want more control, or lots of Javascript libraries (like Howler) if you’re only targeting web.

2 Likes

Yep, it’s pretty basic. If you want to simplify things I believe that Debeat can help you a bit when implementing sounds in your game.

2 Likes