aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-11-29 10:22:12 -0800
committerChris Robinson <[email protected]>2009-11-29 10:22:12 -0800
commitfdd314f7f8eddb6085a69b812bfa5a74dff6533d (patch)
treeaff8a6e399d0b8db2a4f2060dd81cfcca2a00bbf
parent39b456d88ce298c7ecd0a59804cf1eba93c8d872 (diff)
Reset the kill flag after the thread has stopped
-rw-r--r--Alc/alsa.c1
-rw-r--r--Alc/dsound.c2
-rw-r--r--Alc/oss.c1
-rw-r--r--Alc/solaris.c2
-rw-r--r--Alc/wave.c2
5 files changed, 8 insertions, 0 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index c239c61a..76f12fdb 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -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;
}
diff --git a/Alc/dsound.c b/Alc/dsound.c
index 111183f3..374cb00c 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -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)
diff --git a/Alc/oss.c b/Alc/oss.c
index 63c92333..c3cd9528 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -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));
diff --git a/Alc/solaris.c b/Alc/solaris.c
index 695f8f86..6cfaaa11 100644
--- a/Alc/solaris.c
+++ b/Alc/solaris.c
@@ -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;
}
diff --git a/Alc/wave.c b/Alc/wave.c
index 11a66243..8de3a623 100644
--- a/Alc/wave.c
+++ b/Alc/wave.c
@@ -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;