From e2368eb960ba1a43f365103a69e03803b8171731 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 4 Nov 2012 04:41:11 -0800 Subject: Use an array to specify the offset for each channel of the device buffer This effectively inverts the DevChannels array --- OpenAL32/Include/alMain.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenAL32/Include/alMain.h') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index b0f0135f..00512997 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -603,7 +603,7 @@ struct ALCdevice_struct // Device flags ALuint Flags; - enum Channel DevChannels[MaxChannels]; + ALuint ChannelOffsets[MaxChannels]; enum Channel Speaker2Chan[MaxChannels]; ALfloat SpeakerAngle[MaxChannels]; @@ -659,6 +659,10 @@ struct ALCdevice_struct // Specifies if the device is currently running #define DEVICE_RUNNING (1<<31) +/* Invalid channel offset */ +#define INVALID_OFFSET (~0u) + + #define LookupBuffer(m, k) ((struct ALbuffer*)LookupUIntMapKey(&(m)->BufferMap, (k))) #define LookupEffect(m, k) ((struct ALeffect*)LookupUIntMapKey(&(m)->EffectMap, (k))) #define LookupFilter(m, k) ((struct ALfilter*)LookupUIntMapKey(&(m)->FilterMap, (k))) -- cgit v1.2.3