summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-08-15 16:33:47 -0700
committerChris Robinson <[email protected]>2008-08-15 16:33:47 -0700
commit3e19ba6ca86758fa356094fab9e85c959421f73f (patch)
tree7693d364f83026d0aaa39caeeba69762c2e97983 /OpenAL32/alSource.c
parentac8c082b8956f315c83b770c26bb3cc8858323b6 (diff)
Clear channel volumes when starting a source
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index b5e36ea6..d7be7f63 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -1361,7 +1361,7 @@ ALAPI ALvoid ALAPIENTRY alSourcePlayv(ALsizei n, const ALuint *pSourceList)
ALbufferlistitem *ALBufferList;
ALboolean bSourcesValid = AL_TRUE;
ALboolean bPlay;
- ALsizei i;
+ ALsizei i, j;
pContext = alcGetCurrentContext();
if (pContext)
@@ -1404,6 +1404,14 @@ ALAPI ALvoid ALAPIENTRY alSourcePlayv(ALsizei n, const ALuint *pSourceList)
if (bPlay)
{
+ for(j = 0;j < OUTPUTCHANNELS;j++)
+ {
+ pSource->DryGains[j] = 0.0f;
+ pSource->WetGains[j] = 0.0f;
+ }
+ pSource->DryGainHF = 0.0f;
+ pSource->WetGainHF = 0.0f;
+
if (pSource->state != AL_PAUSED)
{
pSource->state = AL_PLAYING;