Defold: Sometimes on Windows it appears that ghost sounds sometimes happen / causes engine to lag/ not close properly

Created on 17 Jan 2021  路  3Comments  路  Source: defold/defold

Describe the bug (REQUIRED)

At some point the sound buffer is filling up with sounds not making any audio

ERROR:GAMESYS: A sound could not be played since the sound buffer is full (32). Message 'play_sound' sent from main:/_audio/_play_proxy#audio_play_proxy to main:/_audio/_sfx#hand_start.
ERROR:GAMESYS: A sound could not be played since the sound buffer is full (32). Message 'play_sound' sent from main:/_audio/_play_proxy#audio_play_proxy to main:/_audio/_sfx#button_click.

When closing

INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.

2021-01-16 17_39_20-Window

When I go to close the engine in this situation it hangs and I have to force close it.

To Reproduce (REQUIRED)
Not sure how to reproduce at the moment. Things that happen are copy of engine running for a while. Might be replaced to Windows being suspended. Maybe we have a bad sound that's playing and causing it possibly (maybe making buffers to fill and OpenAL complaining.)

Expected behavior (REQUIRED)
A clear and concise description of what you expected to happen.

Defold version (REQUIRED):
1.2.178

Platforms (REQUIRED):
Windows 10

bug sound windows

Most helpful comment

I think the likely cause is switching audio devices. I have a bluetooth headset I sometimes use and I realize this happens around the time I turn off the bluetooth headset and go back to speakers. So some kind of strange interaction there possibly. Will do more testing.

I tested more, deliberately shut off bluetooth headset while running engine, and soon after got messages like

ERROR:GAMESYS: A sound could not be played since the sound buffer is full (32). Message 'play_sound' sent from

then on closing got the

INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete

So this is likely related to changing audio devices while running the engine.

All 3 comments

I think the likely cause is switching audio devices. I have a bluetooth headset I sometimes use and I realize this happens around the time I turn off the bluetooth headset and go back to speakers. So some kind of strange interaction there possibly. Will do more testing.

I tested more, deliberately shut off bluetooth headset while running engine, and soon after got messages like

ERROR:GAMESYS: A sound could not be played since the sound buffer is full (32). Message 'play_sound' sent from

then on closing got the

INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete
ERROR:SOUND: Still buffers in OpenAL. Bailing.
INFO:SOUND: Waiting for OpenAL device to complete

So this is likely related to changing audio devices while running the engine.

Looks like a duplicate of: https://github.com/defold/editor2-issues/issues/2818, but I have a case more similar to this one (switching or unplugging BT headphones)

Yeah this is a dupe. At least we know why it's happening now!

Was this page helpful?
0 / 5 - 0 ratings