Skip to content

Commit ff4c30a

Browse files
committed
Remove an unneeded member functions
1 parent d5a43d9 commit ff4c30a

3 files changed

Lines changed: 5 additions & 12 deletions

File tree

alc/alu.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ void CalcDirectPanning(Voice *voice, DirectMode directmode,
11421142
for(const auto c : std::views::iota(0_uz, chans.size()))
11431143
{
11441144
const auto pangain = ChannelPanGain(chans[c].channel);
1145-
if(auto idx = device->channelIdxByName(chans[c].channel); idx != InvalidChannelIndex)
1145+
if(auto idx = device->RealOut.ChannelIndex[chans[c].channel]; idx != InvalidChannelIndex)
11461146
voice->mChans[c].mDryParams.Gains.Target[idx] = drygain.Base * pangain;
11471147
else if(directmode == DirectMode::RemixMismatch)
11481148
{
@@ -1153,7 +1153,7 @@ void CalcDirectPanning(Voice *voice, DirectMode directmode,
11531153

11541154
for(const auto &target : remap->targets)
11551155
{
1156-
idx = device->channelIdxByName(target.channel);
1156+
idx = device->RealOut.ChannelIndex[target.channel];
11571157
if(idx != InvalidChannelIndex)
11581158
voice->mChans[c].mDryParams.Gains.Target[idx] = drygain.Base * pangain
11591159
* target.mix;
@@ -1360,7 +1360,7 @@ void CalcNormalPanning(Voice *voice, const float xpos, const float ypos, const f
13601360
{
13611361
if(device->Dry.Buffer.data() == device->RealOut.Buffer.data())
13621362
{
1363-
const auto idx = uint{device->channelIdxByName(chans[c].channel)};
1363+
const auto idx = uint{device->RealOut.ChannelIndex[chans[c].channel]};
13641364
if(idx != InvalidChannelIndex)
13651365
voice->mChans[c].mDryParams.Gains.Target[idx] = drygain.Base * pangain;
13661366
}
@@ -1432,7 +1432,7 @@ void CalcNormalPanning(Voice *voice, const float xpos, const float ypos, const f
14321432
{
14331433
if(device->Dry.Buffer.data() == device->RealOut.Buffer.data())
14341434
{
1435-
const auto idx = size_t{device->channelIdxByName(chans[c].channel)};
1435+
const auto idx = size_t{device->RealOut.ChannelIndex[chans[c].channel]};
14361436
if(idx != InvalidChannelIndex)
14371437
voice->mChans[c].mDryParams.Gains.Target[idx] = drygain.Base * pangain;
14381438
}

alc/panning.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ auto InitPanning(al::Device *device, const bool hqdec=false, const bool stablize
760760
auto chancoeffslf = std::vector<ChannelDec>{};
761761
for(const auto i : std::views::iota(0_uz, decoder.mChannels.size()))
762762
{
763-
const auto idx = size_t{device->channelIdxByName(decoder.mChannels[i])};
763+
const auto idx = size_t{device->RealOut.ChannelIndex[decoder.mChannels[i]]};
764764
if(idx == InvalidChannelIndex)
765765
{
766766
ERR("Failed to find {} channel in device",

core/device.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,6 @@ struct DeviceBase {
390390
void handleDisconnect(fmt::format_string<Args...> fmt, Args&& ...args)
391391
{ doDisconnect(fmt::format(std::move(fmt), std::forward<Args>(args)...)); }
392392

393-
/**
394-
* Returns the index for the given channel name (e.g. FrontCenter), or
395-
* InvalidChannelIndex if it doesn't exist.
396-
*/
397-
[[nodiscard]] auto channelIdxByName(Channel chan) const noexcept -> std::uint8_t
398-
{ return RealOut.ChannelIndex[chan]; }
399-
400393
private:
401394
uint renderSamples(const uint numSamples);
402395

0 commit comments

Comments
 (0)