aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-08-01 13:06:14 -0700
committerChris Robinson <[email protected]>2022-08-02 18:26:49 -0700
commita1faa5d311e6d4f9daad601e181686486a8efd90 (patch)
tree5676f2996448a1750d8ef6aebc9a3001a4c19c3d /alc
parent810821a2216ac786eac602b47c21e638a35f4ace (diff)
Change an inline function to a class method
Diffstat (limited to 'alc')
-rw-r--r--alc/alu.cpp8
-rw-r--r--alc/effects/dedicated.cpp7
-rw-r--r--alc/panning.cpp2
3 files changed, 8 insertions, 9 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index f5504b5a..ef311395 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -916,7 +916,7 @@ void CalcPanningAndFilters(Voice *voice, const float xpos, const float ypos, con
for(size_t c{0};c < num_channels;c++)
{
- uint idx{GetChannelIdxByName(Device->RealOut, chans[c].channel)};
+ uint idx{Device->channelIdxByName(chans[c].channel)};
if(idx != INVALID_CHANNEL_INDEX)
voice->mChans[c].mDryParams.Gains.Target[idx] = DryGain.Base;
else if(DirectChannels == DirectMode::RemixMismatch)
@@ -929,7 +929,7 @@ void CalcPanningAndFilters(Voice *voice, const float xpos, const float ypos, con
{
for(const auto &target : remap->targets)
{
- idx = GetChannelIdxByName(Device->RealOut, target.channel);
+ idx = Device->channelIdxByName(target.channel);
if(idx != INVALID_CHANNEL_INDEX)
voice->mChans[c].mDryParams.Gains.Target[idx] = DryGain.Base *
target.mix;
@@ -1076,7 +1076,7 @@ void CalcPanningAndFilters(Voice *voice, const float xpos, const float ypos, con
{
if(Device->Dry.Buffer.data() == Device->RealOut.Buffer.data())
{
- const uint idx{GetChannelIdxByName(Device->RealOut, chans[c].channel)};
+ const uint idx{Device->channelIdxByName(chans[c].channel)};
if(idx != INVALID_CHANNEL_INDEX)
voice->mChans[c].mDryParams.Gains.Target[idx] = DryGain.Base;
}
@@ -1114,7 +1114,7 @@ void CalcPanningAndFilters(Voice *voice, const float xpos, const float ypos, con
{
if(Device->Dry.Buffer.data() == Device->RealOut.Buffer.data())
{
- const uint idx{GetChannelIdxByName(Device->RealOut, chans[c].channel)};
+ const uint idx{Device->channelIdxByName(chans[c].channel)};
if(idx != INVALID_CHANNEL_INDEX)
voice->mChans[c].mDryParams.Gains.Target[idx] = DryGain.Base;
}
diff --git a/alc/effects/dedicated.cpp b/alc/effects/dedicated.cpp
index 671eb5ec..434dfc69 100644
--- a/alc/effects/dedicated.cpp
+++ b/alc/effects/dedicated.cpp
@@ -70,8 +70,7 @@ void DedicatedState::update(const ContextBase*, const EffectSlot *slot,
if(slot->EffectType == EffectSlotType::DedicatedLFE)
{
- const uint idx{!target.RealOut ? INVALID_CHANNEL_INDEX :
- GetChannelIdxByName(*target.RealOut, LFE)};
+ const uint idx{target.RealOut ? target.RealOut->ChannelIndex[LFE] : INVALID_CHANNEL_INDEX};
if(idx != INVALID_CHANNEL_INDEX)
{
mOutTarget = target.RealOut->Buffer;
@@ -82,8 +81,8 @@ void DedicatedState::update(const ContextBase*, const EffectSlot *slot,
{
/* Dialog goes to the front-center speaker if it exists, otherwise it
* plays from the front-center location. */
- const uint idx{!target.RealOut ? INVALID_CHANNEL_INDEX :
- GetChannelIdxByName(*target.RealOut, FrontCenter)};
+ const uint idx{target.RealOut ? target.RealOut->ChannelIndex[FrontCenter]
+ : INVALID_CHANNEL_INDEX};
if(idx != INVALID_CHANNEL_INDEX)
{
mOutTarget = target.RealOut->Buffer;
diff --git a/alc/panning.cpp b/alc/panning.cpp
index 847c7391..113ea280 100644
--- a/alc/panning.cpp
+++ b/alc/panning.cpp
@@ -629,7 +629,7 @@ void InitPanning(ALCdevice *device, const bool hqdec=false, const bool stablize=
al::vector<ChannelDec> chancoeffs, chancoeffslf;
for(size_t i{0u};i < decoder.mChannels.size();++i)
{
- const uint idx{GetChannelIdxByName(device->RealOut, decoder.mChannels[i])};
+ const uint idx{device->channelIdxByName(decoder.mChannels[i])};
if(idx == INVALID_CHANNEL_INDEX)
{
ERR("Failed to find %s channel in device\n",