Reset the kill flag after the thread has stopped

This commit is contained in:
Chris Robinson 2009-11-29 10:22:12 -08:00
parent 39b456d88c
commit fdd314f7f8
5 changed files with 8 additions and 0 deletions

View File

@ -706,6 +706,7 @@ static void alsa_stop_playback(ALCdevice *device)
StopThread(data->thread);
data->thread = NULL;
}
data->killNow = 0;
free(data->buffer);
data->buffer = NULL;
}

View File

@ -445,6 +445,8 @@ static void DSoundStopPlayback(ALCdevice *device)
StopThread(pData->thread);
pData->thread = NULL;
pData->killNow = 0;
IDirectSoundBuffer_Release(pData->DSsbuffer);
pData->DSsbuffer = NULL;
if (pData->DSpbuffer)

View File

@ -292,6 +292,7 @@ static void oss_stop_playback(ALCdevice *device)
StopThread(data->thread);
data->thread = NULL;
data->killNow = 0;
if(ioctl(data->fd, SNDCTL_DSP_RESET) != 0)
AL_PRINT("Error resetting device: %s\n", strerror(errno));

View File

@ -217,6 +217,8 @@ static void solaris_stop_playback(ALCdevice *device)
StopThread(data->thread);
data->thread = NULL;
data->killNow = 0;
free(data->mix_data);
data->mix_data = NULL;
}

View File

@ -251,6 +251,8 @@ static void wave_stop_playback(ALCdevice *device)
StopThread(data->thread);
data->thread = NULL;
data->killNow = 0;
free(data->buffer);
data->buffer = NULL;