aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-08-20 21:35:18 -0700
committerChris Robinson <[email protected]>2014-08-21 00:29:42 -0700
commitb92e643e9742765acd364bcbe30ebaedbe50400f (patch)
treee65318fdffb9105d9b247f425e09b283c855552d /OpenAL32/Include
parent3a6baab495d92afd17fccd61b87ae526235fce88 (diff)
Use a NULL source for inactive activesources
Also only access the activesource's source field once per update.
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alSource.h7
-rw-r--r--OpenAL32/Include/alu.h10
2 files changed, 12 insertions, 5 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 8d74fc54..173db94e 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -11,6 +11,9 @@
extern "C" {
#endif
+struct ALbuffer;
+struct ALsource;
+
extern enum Resampler DefaultResampler;
extern const ALsizei ResamplerPadding[ResamplerMax];
@@ -25,10 +28,10 @@ typedef struct ALbufferlistitem {
typedef struct ALactivesource {
- struct ALsource *Source;
+ struct ALsource *volatile Source;
/** Method to update mixing parameters. */
- ALvoid (*Update)(struct ALactivesource *self, const ALCcontext *context);
+ ALvoid (*Update)(struct ALactivesource *self, const struct ALsource *source, const ALCcontext *context);
/** Current target parameters used for mixing. */
ALint Step;
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 7727c666..ac09f89f 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -41,6 +41,10 @@
extern "C" {
#endif
+struct ALsource;
+struct ALactivesource;
+
+
enum ActiveFilters {
AF_None = 0,
AF_LowPass = 1,
@@ -216,10 +220,10 @@ inline void SetGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxC
}
-ALvoid CalcSourceParams(struct ALactivesource *src, const ALCcontext *ALContext);
-ALvoid CalcNonAttnSourceParams(struct ALactivesource *src, const ALCcontext *ALContext);
+ALvoid CalcSourceParams(struct ALactivesource *src, const struct ALsource *source, const ALCcontext *ALContext);
+ALvoid CalcNonAttnSourceParams(struct ALactivesource *src, const struct ALsource *source, const ALCcontext *ALContext);
-ALvoid MixSource(struct ALactivesource *src, ALCdevice *Device, ALuint SamplesToDo);
+ALvoid MixSource(struct ALactivesource *src, struct ALsource *source, ALCdevice *Device, ALuint SamplesToDo);
ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size);
/* Caller must lock the device. */