diff options
-rw-r--r-- | Alc/alu.cpp | 24 | ||||
-rw-r--r-- | Alc/effects/dedicated.cpp | 4 | ||||
-rw-r--r-- | Alc/mixvoice.cpp | 4 | ||||
-rw-r--r-- | Alc/panning.cpp | 2 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 4 |
5 files changed, 19 insertions, 19 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp index 75504af5..92502eee 100644 --- a/Alc/alu.cpp +++ b/Alc/alu.cpp @@ -128,8 +128,8 @@ void ProcessHrtf(ALCdevice *device, ALsizei SamplesToDo) device->FOAOut.Buffer, SamplesToDo ); - int lidx{GetChannelIdxByName(&device->RealOut, FrontLeft)}; - int ridx{GetChannelIdxByName(&device->RealOut, FrontRight)}; + int lidx{GetChannelIdxByName(device->RealOut, FrontLeft)}; + int ridx{GetChannelIdxByName(device->RealOut, FrontRight)}; assert(lidx != -1 && ridx != -1); DirectHrtfState *state{device->mHrtfState.get()}; @@ -163,8 +163,8 @@ void ProcessAmbiUp(ALCdevice *device, ALsizei SamplesToDo) void ProcessUhj(ALCdevice *device, ALsizei SamplesToDo) { - int lidx = GetChannelIdxByName(&device->RealOut, FrontLeft); - int ridx = GetChannelIdxByName(&device->RealOut, FrontRight); + int lidx = GetChannelIdxByName(device->RealOut, FrontLeft); + int ridx = GetChannelIdxByName(device->RealOut, FrontRight); assert(lidx != -1 && ridx != -1); /* Encode to stereo-compatible 2-channel UHJ output. */ @@ -176,8 +176,8 @@ void ProcessUhj(ALCdevice *device, ALsizei SamplesToDo) void ProcessBs2b(ALCdevice *device, ALsizei SamplesToDo) { - int lidx = GetChannelIdxByName(&device->RealOut, FrontLeft); - int ridx = GetChannelIdxByName(&device->RealOut, FrontRight); + int lidx = GetChannelIdxByName(device->RealOut, FrontLeft); + int ridx = GetChannelIdxByName(device->RealOut, FrontRight); assert(lidx != -1 && ridx != -1); /* Apply binaural/crossfeed filter */ @@ -696,7 +696,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev for(ALsizei c{0};c < num_channels;c++) { - int idx{GetChannelIdxByName(&Device->RealOut, chans[c].channel)}; + int idx{GetChannelIdxByName(Device->RealOut, chans[c].channel)}; if(idx != -1) voice->Direct.Params[c].Gains.Target[idx] = DryGain; } @@ -843,7 +843,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev { if(Device->Dry.Buffer == Device->RealOut.Buffer) { - int idx = GetChannelIdxByName(&Device->RealOut, chans[c].channel); + int idx = GetChannelIdxByName(Device->RealOut, chans[c].channel); if(idx != -1) voice->Direct.Params[c].Gains.Target[idx] = DryGain; } continue; @@ -894,7 +894,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev { if(Device->Dry.Buffer == Device->RealOut.Buffer) { - int idx = GetChannelIdxByName(&Device->RealOut, chans[c].channel); + int idx = GetChannelIdxByName(Device->RealOut, chans[c].channel); if(idx != -1) voice->Direct.Params[c].Gains.Target[idx] = DryGain; } continue; @@ -1683,9 +1683,9 @@ void aluMixData(ALCdevice *device, ALvoid *OutBuffer, ALsizei NumSamples) /* Apply front image stablization for surround sound, if applicable. */ if(device->Stablizer) { - const int lidx{GetChannelIdxByName(&device->RealOut, FrontLeft)}; - const int ridx{GetChannelIdxByName(&device->RealOut, FrontRight)}; - const int cidx{GetChannelIdxByName(&device->RealOut, FrontCenter)}; + const int lidx{GetChannelIdxByName(device->RealOut, FrontLeft)}; + const int ridx{GetChannelIdxByName(device->RealOut, FrontRight)}; + const int cidx{GetChannelIdxByName(device->RealOut, FrontCenter)}; assert(lidx >= 0 && ridx >= 0 && cidx >= 0); ApplyStablizer(device->Stablizer.get(), device->RealOut.Buffer, lidx, ridx, cidx, diff --git a/Alc/effects/dedicated.cpp b/Alc/effects/dedicated.cpp index 491b57ec..c0af33e1 100644 --- a/Alc/effects/dedicated.cpp +++ b/Alc/effects/dedicated.cpp @@ -60,7 +60,7 @@ void ALdedicatedState::update(const ALCcontext *context, const ALeffectslot *slo if(slot->Params.EffectType == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT) { int idx; - if((idx=GetChannelIdxByName(&device->RealOut, LFE)) != -1) + if((idx=GetChannelIdxByName(device->RealOut, LFE)) != -1) { mOutBuffer = device->RealOut.Buffer; mOutChannels = device->RealOut.NumChannels; @@ -71,7 +71,7 @@ void ALdedicatedState::update(const ALCcontext *context, const ALeffectslot *slo { /* Dialog goes to the front-center speaker if it exists, otherwise it * plays from the front-center location. */ - int idx{GetChannelIdxByName(&device->RealOut, FrontCenter)}; + int idx{GetChannelIdxByName(device->RealOut, FrontCenter)}; if(idx != -1) { mOutBuffer = device->RealOut.Buffer; diff --git a/Alc/mixvoice.cpp b/Alc/mixvoice.cpp index 682e552f..f43ae127 100644 --- a/Alc/mixvoice.cpp +++ b/Alc/mixvoice.cpp @@ -550,8 +550,8 @@ ALboolean MixSource(ALvoice *voice, ALuint SourceID, ALCcontext *Context, ALsize } else { - const int lidx{GetChannelIdxByName(&Device->RealOut, FrontLeft)}; - const int ridx{GetChannelIdxByName(&Device->RealOut, FrontRight)}; + const int lidx{GetChannelIdxByName(Device->RealOut, FrontLeft)}; + const int ridx{GetChannelIdxByName(Device->RealOut, FrontRight)}; assert(lidx != -1 && ridx != -1); ALsizei fademix{0}; diff --git a/Alc/panning.cpp b/Alc/panning.cpp index d03977b8..783fe480 100644 --- a/Alc/panning.cpp +++ b/Alc/panning.cpp @@ -198,7 +198,7 @@ bool MakeSpeakerMap(ALCdevice *device, const AmbDecConf *conf, ALsizei (&speaker return -1; } } - const int chidx{GetChannelIdxByName(&device->RealOut, ch)}; + const int chidx{GetChannelIdxByName(device->RealOut, ch)}; if(chidx == -1) ERR("Failed to lookup AmbDec speaker label %s\n", speaker.Name.c_str()); return chidx; diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index a2666435..daafaad1 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -906,8 +906,8 @@ inline ALint GetChannelIndex(const Channel (&names)[MAX_OUTPUT_CHANNELS], Channe * Returns the index for the given channel name (e.g. FrontCenter), or -1 if it * doesn't exist. */ -inline ALint GetChannelIdxByName(const RealMixParams *real, enum Channel chan) -{ return GetChannelIndex(real->ChannelName, chan); } +inline ALint GetChannelIdxByName(const RealMixParams &real, Channel chan) +{ return GetChannelIndex(real.ChannelName, chan); } void StartEventThrd(ALCcontext *ctx); |