aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/mixer.c4
-rw-r--r--OpenAL32/Include/alu.h9
-rw-r--r--OpenAL32/alSource.c3
3 files changed, 7 insertions, 9 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index a189e5e3..d8adb697 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -398,7 +398,7 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei
Resample = ((increment == FRACTIONONE && DataPosFrac == 0) ?
Resample_copy32_C : ResampleSamples);
- Counter = voice->Moving ? SamplesToDo : 0;
+ Counter = (voice->Flags&VOICE_IS_MOVING) ? SamplesToDo : 0;
OutPos = 0;
do {
ALsizei SrcBufferSize, DstBufferSize;
@@ -723,7 +723,7 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei
}
} while(State == AL_PLAYING && OutPos < SamplesToDo);
- voice->Moving = AL_TRUE;
+ voice->Flags |= VOICE_IS_MOVING;
/* Update source info */
ATOMIC_STORE(&voice->position, DataPosInt, almemory_order_relaxed);
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 6c374ebc..8888bdc0 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -155,8 +155,10 @@ typedef struct SendParams {
} Gains;
} SendParams;
-#define VOICE_IS_HRTF (1<<0)
-#define VOICE_HAS_NFC (1<<1)
+/* If not 'moving', gain targets are used directly without fading. */
+#define VOICE_IS_MOVING (1<<0)
+#define VOICE_IS_HRTF (1<<1)
+#define VOICE_HAS_NFC (1<<2)
typedef struct ALvoice {
struct ALsourceProps *Props;
@@ -185,9 +187,6 @@ typedef struct ALvoice {
/** Current target parameters used for mixing. */
ALint Step;
- /* If not 'moving', gain/coefficients are set directly without fading. */
- ALboolean Moving;
-
ALuint Flags;
ALuint Offset; /* Number of output samples mixed since starting. */
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 55a4aae1..a36231b5 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -3034,7 +3034,7 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
* volume last specified; there's no reason to fade from where
* it stopped at.
*/
- voice->Moving = AL_FALSE;
+ voice->Flags &= ~VOICE_IS_MOVING;
ATOMIC_STORE(&voice->Playing, true, almemory_order_release);
ATOMIC_STORE(&Source->state, AL_PLAYING, almemory_order_release);
goto done;
@@ -3083,7 +3083,6 @@ ALvoid SetSourceState(ALsource *Source, ALCcontext *Context, ALenum state)
*/
voice->Step = 0;
- voice->Moving = AL_FALSE;
voice->Flags = 0;
for(i = 0;i < MAX_INPUT_CHANNELS;i++)
{