mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
stream buffers recycling fix
This commit is contained in:
parent
a5f0f0a780
commit
7cca53fca3
1 changed files with 7 additions and 0 deletions
|
|
@ -254,6 +254,13 @@ void ALSpeaker::stop() {
|
|||
stopped = true;
|
||||
if (source) {
|
||||
AL_CHECK(alSourceStop(source));
|
||||
|
||||
uint processed = AL::getSourcei(source, AL_BUFFERS_PROCESSED);
|
||||
while (processed--) {
|
||||
uint buffer;
|
||||
AL_CHECK(alSourceUnqueueBuffers(source, 1, &buffer));
|
||||
al->freeBuffer(buffer);
|
||||
}
|
||||
al->freeSource(source);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue