diff options
author | Chris Robinson <[email protected]> | 2019-06-05 23:00:28 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-06-05 23:00:28 -0700 |
commit | 24df52c0420128ec9808cd65efa1aad7fd6827ec (patch) | |
tree | 9dfcfcb6828b27376e173d1efbb50c4fa01a6aa8 /Alc/panning.cpp | |
parent | f9da06fc6a265e3ab2f548a9533b222e7a183637 (diff) |
Remove the per-voice ChannelsPerOrder field
Diffstat (limited to 'Alc/panning.cpp')
-rw-r--r-- | Alc/panning.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Alc/panning.cpp b/Alc/panning.cpp index d43f3f0f..714c3e98 100644 --- a/Alc/panning.cpp +++ b/Alc/panning.cpp @@ -233,7 +233,8 @@ constexpr ChannelMap MonoCfg[1] = { { BackRight, { 2.04124145e-1f, -1.08880247e-1f, -1.88586120e-1f, 1.29099444e-1f, 7.45355993e-2f, -3.73460789e-2f, 0.00000000e+0f } }, }; -void InitNearFieldCtrl(ALCdevice *device, ALfloat ctrl_dist, ALsizei order, const ALsizei *RESTRICT chans_per_order) +void InitNearFieldCtrl(ALCdevice *device, ALfloat ctrl_dist, ALsizei order, + const ALuint *RESTRICT chans_per_order) { /* NFC is only used when AvgSpeakerDist is greater than 0. */ const char *devname{device->DeviceName.c_str()}; @@ -245,7 +246,7 @@ void InitNearFieldCtrl(ALCdevice *device, ALfloat ctrl_dist, ALsizei order, cons auto iter = std::copy(chans_per_order, chans_per_order+order+1, std::begin(device->NumChannelsPerOrder)); - std::fill(iter, std::end(device->NumChannelsPerOrder), 0); + std::fill(iter, std::end(device->NumChannelsPerOrder), 0u); } void InitDistanceComp(ALCdevice *device, const AmbDecConf *conf, const ALsizei (&speakermap)[MAX_OUTPUT_CHANNELS]) @@ -388,7 +389,7 @@ void InitPanning(ALCdevice *device) ALfloat nfc_delay{0.0f}; if(ConfigValueFloat(devname, "decoder", "nfc-ref-delay", &nfc_delay) && nfc_delay > 0.0f) { - static constexpr ALsizei chans_per_order[MAX_AMBI_ORDER+1]{ 1, 3, 5, 7 }; + static constexpr ALuint chans_per_order[MAX_AMBI_ORDER+1]{ 1, 3, 5, 7 }; nfc_delay = clampf(nfc_delay, 0.001f, 1000.0f); InitNearFieldCtrl(device, nfc_delay * SPEEDOFSOUNDMETRESPERSEC, device->mAmbiOrder, chans_per_order); @@ -439,8 +440,8 @@ void InitPanning(ALCdevice *device) void InitCustomPanning(ALCdevice *device, bool hqdec, const AmbDecConf *conf, const ALsizei (&speakermap)[MAX_OUTPUT_CHANNELS]) { - static constexpr ALsizei chans_per_order2d[MAX_AMBI_ORDER+1] = { 1, 2, 2, 2 }; - static constexpr ALsizei chans_per_order3d[MAX_AMBI_ORDER+1] = { 1, 3, 5, 7 }; + static constexpr ALuint chans_per_order2d[MAX_AMBI_ORDER+1] = { 1, 2, 2, 2 }; + static constexpr ALuint chans_per_order3d[MAX_AMBI_ORDER+1] = { 1, 3, 5, 7 }; if(!hqdec && conf->FreqBands != 1) ERR("Basic renderer uses the high-frequency matrix as single-band (xover_freq = %.0fhz)\n", @@ -546,7 +547,7 @@ void InitHrtfPanning(ALCdevice *device) }, AmbiOrderHFGain3O[MAX_AMBI_ORDER+1]{ 1.86508671e+00f, 1.60609389e+00f, 1.14205530e+00f, 5.68379553e-01f }; - static constexpr ALsizei ChansPerOrder[MAX_AMBI_ORDER+1]{ 1, 3, 5, 7 }; + static constexpr ALuint ChansPerOrder[MAX_AMBI_ORDER+1]{ 1, 3, 5, 7 }; const ALfloat *AmbiOrderHFGain{AmbiOrderHFGain1O}; static_assert(al::size(AmbiPoints) == al::size(AmbiMatrix), "Ambisonic HRTF mismatch"); @@ -759,7 +760,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, HrtfRequestMode hrtf_appr device->Dry.AmbiMap.fill(BFChannelConfig{}); device->Dry.NumChannels = 0; - std::fill(std::begin(device->NumChannelsPerOrder), std::end(device->NumChannelsPerOrder), 0); + std::fill(std::begin(device->NumChannelsPerOrder), std::end(device->NumChannelsPerOrder), 0u); device->AvgSpeakerDist = 0.0f; device->ChannelDelay.clear(); |