@@ -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 }
0 commit comments