summaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alu.h9
-rw-r--r--OpenAL32/alSource.c10
2 files changed, 17 insertions, 2 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 3850875d..cfc54acc 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -87,7 +87,14 @@ typedef struct SendParams {
/* Gain control, which applies to all input channels to a single (mono)
* output buffer. */
- ALfloat Gain;
+ struct {
+ ALfloat Current;
+ ALfloat Step;
+ ALfloat Target;
+ } Gain;
+
+ ALboolean Moving;
+ ALuint Counter;
ALfilterState LpFilter[MAX_INPUT_CHANNELS];
} SendParams;
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 082d8f54..acccd0be 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -2276,6 +2276,7 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
{
if(state == AL_PLAYING)
{
+ ALCdevice *device = Context->Device;
ALbufferlistitem *BufferList;
ALactivesource *src = NULL;
ALsizei j, k;
@@ -2306,7 +2307,7 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
/* If there's nothing to play, or device is disconnected, go right to
* stopped */
- if(!BufferList || !Context->Device->Connected)
+ if(!BufferList || !device->Connected)
{
SetSourceState(Source, Context, AL_STOPPED);
return;
@@ -2339,6 +2340,8 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
}
else
{
+ ALuint i;
+
src->Direct.Moving = AL_FALSE;
src->Direct.Counter = 0;
for(j = 0;j < MAX_INPUT_CHANNELS;j++)
@@ -2351,6 +2354,11 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
src->Direct.Mix.Hrtf.State.Values[j][k][1] = 0.0f;
}
}
+ for(i = 0;i < device->NumAuxSends;i++)
+ {
+ src->Send[i].Counter = 0;
+ src->Send[i].Moving = AL_FALSE;
+ }
}
Source->NeedsUpdate = AL_TRUE;
}