Rename From2D to FromACN2D
This commit is contained in:
+1
-1
@@ -361,7 +361,7 @@ auto GetAmbiLayout(AmbiLayout layouttype) noexcept -> const std::array<uint8_t,M
|
||||
auto GetAmbi2DLayout(AmbiLayout layouttype) noexcept -> const std::array<uint8_t,MaxAmbi2DChannels>&
|
||||
{
|
||||
if(layouttype == AmbiLayout::FuMa) return AmbiIndex::FromFuMa2D;
|
||||
return AmbiIndex::From2D;
|
||||
return AmbiIndex::FromACN2D;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -62,7 +62,7 @@ BFormatDec::BFormatDec(const AmbDecConf *conf, const bool allow_2band, const siz
|
||||
{
|
||||
for(size_t j{0},k{0};j < mChannelDec.size();++j)
|
||||
{
|
||||
const size_t acn{periphonic ? j : AmbiIndex::From2D[j]};
|
||||
const size_t acn{periphonic ? j : AmbiIndex::FromACN2D[j]};
|
||||
if(!(conf->ChanMask&(1u<<acn))) continue;
|
||||
const size_t order{AmbiIndex::OrderFromChannel[acn]};
|
||||
const float gain{conf->HFOrderGain[order] / coeff_scale[acn]};
|
||||
@@ -83,7 +83,7 @@ BFormatDec::BFormatDec(const AmbDecConf *conf, const bool allow_2band, const siz
|
||||
const float ratio{std::pow(10.0f, conf->XOverRatio / 40.0f)};
|
||||
for(size_t j{0},k{0};j < mChannelDec.size();++j)
|
||||
{
|
||||
const size_t acn{periphonic ? j : AmbiIndex::From2D[j]};
|
||||
const size_t acn{periphonic ? j : AmbiIndex::FromACN2D[j]};
|
||||
if(!(conf->ChanMask&(1u<<acn))) continue;
|
||||
const size_t order{AmbiIndex::OrderFromChannel[acn]};
|
||||
const float hfGain{conf->HFOrderGain[order] * ratio / coeff_scale[acn]};
|
||||
|
||||
@@ -89,7 +89,7 @@ auto GetAmbiLayout(AmbiLayout layouttype) noexcept -> const std::array<uint8_t,M
|
||||
auto GetAmbi2DLayout(AmbiLayout layouttype) noexcept -> const std::array<uint8_t,MaxAmbi2DChannels>&
|
||||
{
|
||||
if(layouttype == AmbiLayout::FuMa) return AmbiIndex::FromFuMa2D;
|
||||
return AmbiIndex::From2D;
|
||||
return AmbiIndex::FromACN2D;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -547,7 +547,7 @@ void InitPanning(ALCdevice *device, const bool hqdec=false, const bool stablize=
|
||||
|
||||
/* Built-in speaker decoders are always 2D. */
|
||||
const size_t ambicount{Ambi2DChannelsFromOrder(decoder.mOrder)};
|
||||
std::transform(AmbiIndex::From2D.begin(), AmbiIndex::From2D.begin()+ambicount,
|
||||
std::transform(AmbiIndex::FromACN2D.begin(), AmbiIndex::FromACN2D.begin()+ambicount,
|
||||
std::begin(device->Dry.AmbiMap),
|
||||
[](const uint8_t &index) noexcept { return BFChannelConfig{1.0f, index}; }
|
||||
);
|
||||
@@ -611,7 +611,7 @@ void InitCustomPanning(ALCdevice *device, const bool hqdec, const bool stablize,
|
||||
else
|
||||
{
|
||||
count = Ambi2DChannelsFromOrder(order);
|
||||
std::transform(AmbiIndex::From2D.begin(), AmbiIndex::From2D.begin()+count,
|
||||
std::transform(AmbiIndex::FromACN2D.begin(), AmbiIndex::FromACN2D.begin()+count,
|
||||
std::begin(device->Dry.AmbiMap),
|
||||
[](const uint8_t &index) noexcept { return BFChannelConfig{1.0f, index}; }
|
||||
);
|
||||
|
||||
+1
-1
@@ -10,6 +10,6 @@ constexpr std::array<float,MaxAmbiChannels> AmbiScale::FromFuMa;
|
||||
constexpr std::array<uint8_t,MaxAmbiChannels> AmbiIndex::FromFuMa;
|
||||
constexpr std::array<uint8_t,MaxAmbi2DChannels> AmbiIndex::FromFuMa2D;
|
||||
constexpr std::array<uint8_t,MaxAmbiChannels> AmbiIndex::FromACN;
|
||||
constexpr std::array<uint8_t,MaxAmbi2DChannels> AmbiIndex::From2D;
|
||||
constexpr std::array<uint8_t,MaxAmbi2DChannels> AmbiIndex::FromACN2D;
|
||||
constexpr std::array<uint8_t,MaxAmbiChannels> AmbiIndex::OrderFromChannel;
|
||||
constexpr std::array<uint8_t,MaxAmbi2DChannels> AmbiIndex::OrderFrom2DChannel;
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ struct AmbiIndex {
|
||||
0, 1, 2, 3, 4, 5, 6, 7,
|
||||
8, 9, 10, 11, 12, 13, 14, 15
|
||||
}};
|
||||
static constexpr std::array<uint8_t,MaxAmbi2DChannels> From2D{{
|
||||
static constexpr std::array<uint8_t,MaxAmbi2DChannels> FromACN2D{{
|
||||
0, 1,3, 4,8, 9,15
|
||||
}};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user