aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index d7859eff..9a4088a2 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -2500,13 +2500,9 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
Context->ActiveSources[Context->ActiveSourceCount] = src;
}
memset(src, 0, sizeof(*src));
+ Context->ActiveSourceCount++;
src->Source = Source;
- if(BufferList->buffer->FmtChannels == FmtMono)
- src->Update = CalcSourceParams;
- else
- src->Update = CalcNonAttnSourceParams;
- Context->ActiveSourceCount++;
}
else
{
@@ -2530,6 +2526,12 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
src->Send[i].Moving = AL_FALSE;
}
}
+
+ if(BufferList->buffer->FmtChannels == FmtMono)
+ src->Update = CalcSourceParams;
+ else
+ src->Update = CalcNonAttnSourceParams;
+
ATOMIC_STORE(&Source->NeedsUpdate, AL_TRUE);
}
else if(state == AL_PAUSED)