Hopefully fix bug with sound playback on Mac

This commit is contained in:
cim 2014-06-13 18:17:22 +01:00
parent 5dc7327c44
commit 853e0bee58

View File

@ -189,13 +189,6 @@ SOFTWARE.
- (void) hasStopped
{
OOAL(alDeleteBuffers(1,&_buffer));
if (_bigSound)
{
// then we have two buffers to cleanup
OOAL(alDeleteBuffers(1,&_lastBuffer));
}
_bigSound = NO;
ALint queued;
OOAL(alGetSourcei(_source, AL_BUFFERS_QUEUED, &queued));
@ -205,6 +198,15 @@ SOFTWARE.
OOAL(alSourceUnqueueBuffers(_source, 1, &buffer));
}
OOAL(alDeleteBuffers(1,&_buffer));
if (_bigSound)
{
// then we have two buffers to cleanup
OOAL(alDeleteBuffers(1,&_lastBuffer));
}
_bigSound = NO;
OOSound *sound = _sound;
_sound = nil;