1
0
forked from 0ad/0ad
0ad/source/soundmanager
wraitii ce74c41297 Fix audio leak that resulted in openAL errors after a while.
Sound items were only deleted after 'last play' when stopped, but they
could also be left in 'paused' or 'initial' states, and were then not
cleared until the game exits (effectively a memory leak). This affected
particularly music & ambient sounds, which also used the most
buffers(/memory).
On MacOS (at least), this resulted in OpenAL errors & sound failures
after a while playing the game, because MacOS has a max "in flight
buffers" of 1024.

Also clean up some control flow in CStreamItem

Reported by: Eszett
Thanks langbart for the consistent repro'.

Fixes #5265

Differential Revision: https://code.wildfiregames.com/D3445
This was SVN commit r24762.
2021-01-22 12:50:05 +00:00
..
data Removes duplication of Clamp function. 2019-09-26 21:14:21 +00:00
items Fix audio leak that resulted in openAL errors after a while. 2021-01-22 12:50:05 +00:00
scripting Lower rolloff so that players that play from very high still hear sound. 2021-01-19 22:40:56 +00:00
ISoundManager.h Don't pause music when pausing the game / Fix victory music in SP. 2021-01-21 09:34:20 +00:00
SoundManager.cpp Fix sound errors when no sound card is detected. 2021-01-11 18:56:33 +00:00
SoundManager.h Fix sound errors when no sound card is detected. 2021-01-11 18:56:33 +00:00