Hopefully fix bug with sound playback on Mac
This commit is contained in:
parent
5dc7327c44
commit
853e0bee58
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user