aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-02 21:33:53 -0700
committerChris Robinson <[email protected]>2011-07-02 21:33:53 -0700
commitac7ca07221c0a5c06b2502baa21ea94e5b65395c (patch)
tree8d5b7d67077d26c397342f814c897e0811240750 /Alc
parentb043390ec2ad465acc12b98acdb51909bdfdd667 (diff)
Get rid of a couple typedefs
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c72
-rw-r--r--Alc/alcEcho.c2
-rw-r--r--Alc/alcModulator.c2
-rw-r--r--Alc/alcReverb.c6
-rw-r--r--Alc/mixer.c6
-rw-r--r--Alc/panning.c8
6 files changed, 48 insertions, 48 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 2e3f81d2..aa574b38 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -89,21 +89,21 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
static const ALfloat angles_X71[8] = { -30.0f, 30.0f, 0.0f, 0.0f,
-110.0f, 110.0f, -90.0f, 90.0f };
- static const Channel chans_Mono[1] = { FRONT_CENTER };
- static const Channel chans_Stereo[2] = { FRONT_LEFT, FRONT_RIGHT };
- static const Channel chans_Rear[2] = { BACK_LEFT, BACK_RIGHT };
- static const Channel chans_Quad[4] = { FRONT_LEFT, FRONT_RIGHT,
- BACK_LEFT, BACK_RIGHT };
- static const Channel chans_X51[6] = { FRONT_LEFT, FRONT_RIGHT,
- FRONT_CENTER, LFE,
- BACK_LEFT, BACK_RIGHT };
- static const Channel chans_X61[7] = { FRONT_LEFT, FRONT_RIGHT,
- FRONT_CENTER, LFE, BACK_CENTER,
- SIDE_LEFT, SIDE_RIGHT };
- static const Channel chans_X71[8] = { FRONT_LEFT, FRONT_RIGHT,
- FRONT_CENTER, LFE,
- BACK_LEFT, BACK_RIGHT,
- SIDE_LEFT, SIDE_RIGHT };
+ static const enum Channel chans_Mono[1] = { FRONT_CENTER };
+ static const enum Channel chans_Stereo[2] = { FRONT_LEFT, FRONT_RIGHT };
+ static const enum Channel chans_Rear[2] = { BACK_LEFT, BACK_RIGHT };
+ static const enum Channel chans_Quad[4] = { FRONT_LEFT, FRONT_RIGHT,
+ BACK_LEFT, BACK_RIGHT };
+ static const enum Channel chans_X51[6] = { FRONT_LEFT, FRONT_RIGHT,
+ FRONT_CENTER, LFE,
+ BACK_LEFT, BACK_RIGHT };
+ static const enum Channel chans_X61[7] = { FRONT_LEFT, FRONT_RIGHT,
+ FRONT_CENTER, LFE, BACK_CENTER,
+ SIDE_LEFT, SIDE_RIGHT };
+ static const enum Channel chans_X71[8] = { FRONT_LEFT, FRONT_RIGHT,
+ FRONT_CENTER, LFE,
+ BACK_LEFT, BACK_RIGHT,
+ SIDE_LEFT, SIDE_RIGHT };
ALCdevice *Device = ALContext->Device;
ALfloat SourceVolume,ListenerGain,MinVolume,MaxVolume;
@@ -117,7 +117,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
ALint NumSends, Frequency;
const ALfloat *SpeakerGain;
const ALfloat *angles = NULL;
- const Channel *chans = NULL;
+ const enum Channel *chans = NULL;
ALint num_channels = 0;
ALboolean VirtualChannels;
ALfloat Pitch;
@@ -218,7 +218,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
for(i = 0;i < (ALint)Device->NumChan;i++)
{
- Channel chan = Device->Speaker2Chan[i];
+ enum Channel chan = Device->Speaker2Chan[i];
SrcMatrix[c][chan] += DryGain * ListenerGain *
SpeakerGain[chan];
}
@@ -312,7 +312,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
for(i = 0;i < (ALint)Device->NumChan;i++)
{
- Channel chan = Device->Speaker2Chan[i];
+ enum Channel chan = Device->Speaker2Chan[i];
SrcMatrix[c][chan] += DryGain * ListenerGain *
SpeakerGain[chan];
}
@@ -747,7 +747,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
}
for(i = 0;i < (ALint)Device->NumChan;i++)
{
- Channel chan = Device->Speaker2Chan[i];
+ enum Channel chan = Device->Speaker2Chan[i];
ALfloat gain = lerp(AmbientGain, SpeakerGain[chan], DirGain);
ALSource->Params.DryGains[0][chan] = DryGain * gain;
}
@@ -792,23 +792,23 @@ static __inline ALbyte aluF2B(ALfloat val)
return i>>8;
}
-static const Channel MonoChans[] = { FRONT_CENTER };
-static const Channel StereoChans[] = { FRONT_LEFT, FRONT_RIGHT };
-static const Channel QuadChans[] = { FRONT_LEFT, FRONT_RIGHT,
- BACK_LEFT, BACK_RIGHT };
-static const Channel X51Chans[] = { FRONT_LEFT, FRONT_RIGHT,
- FRONT_CENTER, LFE,
- BACK_LEFT, BACK_RIGHT };
-static const Channel X51SideChans[] = { FRONT_LEFT, FRONT_RIGHT,
- FRONT_CENTER, LFE,
- SIDE_LEFT, SIDE_RIGHT };
-static const Channel X61Chans[] = { FRONT_LEFT, FRONT_LEFT,
- FRONT_CENTER, LFE, BACK_CENTER,
- SIDE_LEFT, SIDE_RIGHT };
-static const Channel X71Chans[] = { FRONT_LEFT, FRONT_RIGHT,
- FRONT_CENTER, LFE,
- BACK_LEFT, BACK_RIGHT,
- SIDE_LEFT, SIDE_RIGHT };
+static const enum Channel MonoChans[] = { FRONT_CENTER };
+static const enum Channel StereoChans[] = { FRONT_LEFT, FRONT_RIGHT };
+static const enum Channel QuadChans[] = { FRONT_LEFT, FRONT_RIGHT,
+ BACK_LEFT, BACK_RIGHT };
+static const enum Channel X51Chans[] = { FRONT_LEFT, FRONT_RIGHT,
+ FRONT_CENTER, LFE,
+ BACK_LEFT, BACK_RIGHT };
+static const enum Channel X51SideChans[] = { FRONT_LEFT, FRONT_RIGHT,
+ FRONT_CENTER, LFE,
+ SIDE_LEFT, SIDE_RIGHT };
+static const enum Channel X61Chans[] = { FRONT_LEFT, FRONT_LEFT,
+ FRONT_CENTER, LFE, BACK_CENTER,
+ SIDE_LEFT, SIDE_RIGHT };
+static const enum Channel X71Chans[] = { FRONT_LEFT, FRONT_RIGHT,
+ FRONT_CENTER, LFE,
+ BACK_LEFT, BACK_RIGHT,
+ SIDE_LEFT, SIDE_RIGHT };
#define DECL_TEMPLATE(T, chans,N, func) \
static void Write_##T##_##chans(ALCdevice *device, T *RESTRICT buffer, \
diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c
index aea2b00a..c47063bb 100644
--- a/Alc/alcEcho.c
+++ b/Alc/alcEcho.c
@@ -94,7 +94,7 @@ static ALboolean EchoDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
state->Gain[i] = 0.0f;
for(i = 0;i < Device->NumChan;i++)
{
- Channel chan = Device->Speaker2Chan[i];
+ enum Channel chan = Device->Speaker2Chan[i];
state->Gain[chan] = 1.0f;
}
diff --git a/Alc/alcModulator.c b/Alc/alcModulator.c
index 55c6740e..8244b454 100644
--- a/Alc/alcModulator.c
+++ b/Alc/alcModulator.c
@@ -139,7 +139,7 @@ static ALboolean ModulatorDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
state->Gain[index] = 0.0f;
for(index = 0;index < Device->NumChan;index++)
{
- Channel chan = Device->Speaker2Chan[index];
+ enum Channel chan = Device->Speaker2Chan[index];
state->Gain[chan] = 1.0f;
}
diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c
index 20638710..f2a09299 100644
--- a/Alc/alcReverb.c
+++ b/Alc/alcReverb.c
@@ -634,7 +634,7 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection
State->Early.PanGain[index] = 0.0f;
for(index = 0;index < Device->NumChan;index++)
{
- Channel chan = Device->Speaker2Chan[index];
+ enum Channel chan = Device->Speaker2Chan[index];
State->Early.PanGain[chan] = lerp(1.0, speakerGain[chan], dirGain);
}
@@ -647,7 +647,7 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection
State->Late.PanGain[index] = 0.0f;
for(index = 0;index < Device->NumChan;index++)
{
- Channel chan = Device->Speaker2Chan[index];
+ enum Channel chan = Device->Speaker2Chan[index];
State->Late.PanGain[chan] = lerp(1.0, speakerGain[chan], dirGain);
}
}
@@ -1018,7 +1018,7 @@ static ALboolean VerbDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
State->Gain[index] = 0.0f;
for(index = 0;index < Device->NumChan;index++)
{
- Channel chan = Device->Speaker2Chan[index];
+ enum Channel chan = Device->Speaker2Chan[index];
State->Gain[chan] = 1.0f;
}
diff --git a/Alc/mixer.c b/Alc/mixer.c
index 77c0d73b..050901ea 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -403,7 +403,7 @@ DECL_TEMPLATE(cubic)
#undef DECL_TEMPLATE
-MixerFunc SelectMixer(ALbuffer *Buffer, resampler_t Resampler)
+MixerFunc SelectMixer(ALbuffer *Buffer, enum Resampler Resampler)
{
switch(Resampler)
{
@@ -441,7 +441,7 @@ DECL_TEMPLATE(cubic)
#undef DECL_TEMPLATE
-MixerFunc SelectHrtfMixer(ALbuffer *Buffer, resampler_t Resampler)
+MixerFunc SelectHrtfMixer(ALbuffer *Buffer, enum Resampler Resampler)
{
switch(Resampler)
{
@@ -466,7 +466,7 @@ ALvoid MixSource(ALsource *Source, ALCdevice *Device, ALuint SamplesToDo)
ALuint BuffersPlayed;
ALboolean Looping;
ALuint increment;
- resampler_t Resampler;
+ enum Resampler Resampler;
ALenum State;
ALuint OutPos;
ALuint FrameSize;
diff --git a/Alc/panning.c b/Alc/panning.c
index 8df70f30..c3459ec1 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -32,12 +32,12 @@
#include "alu.h"
static void SetSpeakerArrangement(const char *name, ALfloat SpeakerAngle[MAXCHANNELS],
- Channel Speaker2Chan[MAXCHANNELS], ALint chans)
+ enum Channel Speaker2Chan[MAXCHANNELS], ALint chans)
{
char layout_str[256];
char *confkey, *next;
char *sep, *end;
- Channel val;
+ enum Channel val;
int i;
if(!ConfigValueExists(NULL, name))
@@ -125,7 +125,7 @@ static void SetSpeakerArrangement(const char *name, ALfloat SpeakerAngle[MAXCHAN
if(min != i)
{
ALfloat tmpf;
- Channel tmpc;
+ enum Channel tmpc;
tmpf = SpeakerAngle[i];
SpeakerAngle[i] = SpeakerAngle[min];
@@ -166,7 +166,7 @@ ALint aluCart2LUTpos(ALfloat re, ALfloat im)
ALvoid aluInitPanning(ALCdevice *Device)
{
ALfloat SpeakerAngle[MAXCHANNELS];
- Channel *Speaker2Chan;
+ enum Channel *Speaker2Chan;
ALfloat Alpha, Theta;
ALint pos;
ALuint s;