# hopefully fix sound error when exiting
as per http://www.wildfiregames.com/forum/index.php?showtopic=12483 thanks to Ykkrosh and oliver! This was SVN commit r7029.
This commit is contained in:
parent
26effc4f99
commit
05d73edd2f
@ -1617,9 +1617,15 @@ static LibError vsrc_reclaim(VSrc* vs)
|
|||||||
alSourceStop(vs->al_src);
|
alSourceStop(vs->al_src);
|
||||||
AL_CHECK;
|
AL_CHECK;
|
||||||
|
|
||||||
// deque and free remaining buffers (if sound was closed abruptly).
|
// clear the source's buffer queue (necessary because buffers cannot
|
||||||
// (note: all queued buffers are now considered 'processed')
|
// be deleted at shutdown while still attached to a source).
|
||||||
vsrc_deque_finished_bufs(vs);
|
// note: OpenAL 1.1 says all buffers become "processed" when the
|
||||||
|
// source is stopped (so vsrc_deque_finished_bufs ought to have the
|
||||||
|
// same effect), but that doesn't seem to be the case on Linux
|
||||||
|
// implementations (OpenAL Soft/ALSA and PulseAudio with on-board
|
||||||
|
// NVidia). wiping out the entire queue is safer, anyway.
|
||||||
|
alSourcei(vs->al_src, AL_BUFFER, AL_NONE);
|
||||||
|
AL_CHECK;
|
||||||
|
|
||||||
al_src_free(vs->al_src);
|
al_src_free(vs->al_src);
|
||||||
return INFO::OK;
|
return INFO::OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user