aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-16 18:07:59 -0800
committerChris Robinson <[email protected]>2018-01-16 18:07:59 -0800
commit248832b26680de4ce48bf17076287a07dbd36ff7 (patch)
tree883a6685549357f5cd5b6490bdb9bf7c03985cf1 /OpenAL32
parentbf8c889631f48f9112987eb0f26e7c6eaa2429aa (diff)
Use a voice flag to indicate it being static
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alu.h10
-rw-r--r--OpenAL32/alSource.c1
2 files changed, 6 insertions, 5 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index f6462cd4..21390806 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -236,10 +236,10 @@ struct ALvoiceProps {
} Send[];
};
-/* If not 'fading', gain targets are used directly without fading. */
-#define VOICE_IS_FADING (1<<0)
-#define VOICE_HAS_HRTF (1<<1)
-#define VOICE_HAS_NFC (1<<2)
+#define VOICE_IS_STATIC (1<<0)
+#define VOICE_IS_FADING (1<<1) /* Fading sources use gain stepping for smooth transitions. */
+#define VOICE_HAS_HRTF (1<<2)
+#define VOICE_HAS_NFC (1<<3)
typedef struct ALvoice {
struct ALvoiceProps *Props;
@@ -516,7 +516,7 @@ inline void ComputeFirstOrderGains(const BFMixParams *foa, const ALfloat mtx[4],
}
-ALboolean MixSource(struct ALvoice *voice, struct ALsource *Source, ALCdevice *Device, ALsizei SamplesToDo);
+ALboolean MixSource(struct ALvoice *voice, ALCdevice *Device, ALsizei SamplesToDo);
void aluMixData(ALCdevice *device, ALvoid *OutBuffer, ALsizei NumSamples);
/* Caller must lock the device. */
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index f4d82c68..83233b3f 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -2623,6 +2623,7 @@ AL_API ALvoid AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources)
voice->Step = 0;
voice->Flags = start_fading ? VOICE_IS_FADING : 0;
+ if(source->SourceType == AL_STATIC) voice->Flags |= VOICE_IS_STATIC;
memset(voice->Direct.Params, 0, sizeof(voice->Direct.Params[0])*voice->NumChannels);
for(s = 0;s < device->NumAuxSends;s++)
memset(voice->Send[s].Params, 0, sizeof(voice->Send[s].Params[0])*voice->NumChannels);