summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 9080b46b..7d0aa978 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -1871,14 +1871,6 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
BufferList = BufferList->next;
}
- /* If there's nothing to play, or device is disconnected, go right to
- * stopped */
- if(!BufferList || !Context->Device->Connected)
- {
- SetSourceState(Source, Context, AL_STOPPED);
- return;
- }
-
if(Source->state != AL_PLAYING)
{
for(j = 0;j < MAXCHANNELS;j++)
@@ -1907,6 +1899,14 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
if(Source->lOffset != -1)
ApplyOffset(Source);
+ /* If there's nothing to play, or device is disconnected, go right to
+ * stopped */
+ if(!BufferList || !Context->Device->Connected)
+ {
+ SetSourceState(Source, Context, AL_STOPPED);
+ return;
+ }
+
for(j = 0;j < Context->ActiveSourceCount;j++)
{
if(Context->ActiveSources[j] == Source)