From d2895c7985c77299617ee0562f53e210e8dd04ca Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 27 Nov 2010 00:15:07 -0800 Subject: Use the enums in a couple more places --- Alc/ALu.c | 8 ++++---- OpenAL32/alSource.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Alc/ALu.c b/Alc/ALu.c index 7c43b0f3..400903ec 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -80,12 +80,12 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) { ALfloat SourceVolume,ListenerGain,MinVolume,MaxVolume; ALbufferlistitem *BufferListItem; + enum FmtChannels Channels; ALfloat DryGain, DryGainHF; ALfloat WetGain[MAX_SENDS]; ALfloat WetGainHF[MAX_SENDS]; ALint NumSends, Frequency; ALboolean DupStereo; - ALint Channels; ALfloat Pitch; ALenum Format; ALfloat cw; @@ -107,7 +107,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) Pitch = ALSource->flPitch; /* Calculate the stepping value */ - Channels = 0; + Channels = FmtMono; BufferListItem = ALSource->queue; while(BufferListItem != NULL) { @@ -130,7 +130,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) ALSource->Params.Step = 1; } - Channels = aluChannelsFromFormat(ALBuffer->format); + Channels = ALBuffer->FmtChannels; break; } BufferListItem = BufferListItem->next; @@ -150,7 +150,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) break; } - if(Channels == 2) + if(Channels == FmtStereo) { for(i = 0;i < OUTPUTCHANNELS;i++) ALSource->Params.DryGains[i] = 0.0f; diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 0e1e7eb7..5244edb7 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -555,7 +555,7 @@ AL_API ALvoid AL_APIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue) Source->queue = BufferListItem; Source->BuffersInQueue = 1; - if(aluChannelsFromFormat(buffer->format) == 1) + if(buffer->FmtChannels == FmtMono) Source->Update = CalcSourceParams; else Source->Update = CalcNonAttnSourceParams; @@ -1595,7 +1595,7 @@ AL_API ALvoid AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei n, const A Frequency = buffer->frequency; Format = buffer->eOriginalFormat; - if(aluChannelsFromFormat(buffer->format) == 1) + if(buffer->FmtChannels == FmtMono) Source->Update = CalcSourceParams; else Source->Update = CalcNonAttnSourceParams; -- cgit v1.2.3