mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2026-02-19 11:23:06 +00:00
remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
This commit is contained in:
@@ -20,8 +20,8 @@ namespace AudioCore::AudioRenderer {
|
||||
void ApplyBiquadFilterFloat(std::span<s32> output, std::span<const s32> input,
|
||||
std::array<s16, 3>& b_, std::array<s16, 2>& a_,
|
||||
VoiceState::BiquadFilterState& state, const u32 sample_count) {
|
||||
constexpr static f64 min{std::numeric_limits<s32>::min()};
|
||||
constexpr static f64 max{std::numeric_limits<s32>::max()};
|
||||
constexpr f64 min{std::numeric_limits<s32>::min()};
|
||||
constexpr f64 max{std::numeric_limits<s32>::max()};
|
||||
std::array<f64, 3> b{Common::FixedPoint<50, 14>::from_base(b_[0]).to_double(),
|
||||
Common::FixedPoint<50, 14>::from_base(b_[1]).to_double(),
|
||||
Common::FixedPoint<50, 14>::from_base(b_[2]).to_double()};
|
||||
@@ -61,8 +61,8 @@ void ApplyBiquadFilterFloat(std::span<s32> output, std::span<const s32> input,
|
||||
static void ApplyBiquadFilterInt(std::span<s32> output, std::span<const s32> input,
|
||||
std::array<s16, 3>& b, std::array<s16, 2>& a,
|
||||
VoiceState::BiquadFilterState& state, const u32 sample_count) {
|
||||
constexpr static s64 min{std::numeric_limits<s32>::min()};
|
||||
constexpr static s64 max{std::numeric_limits<s32>::max()};
|
||||
constexpr s64 min{std::numeric_limits<s32>::min()};
|
||||
constexpr s64 max{std::numeric_limits<s32>::max()};
|
||||
|
||||
for (u32 i = 0; i < sample_count; i++) {
|
||||
const s64 in_sample{input[i]};
|
||||
|
||||
@@ -244,16 +244,16 @@ template <size_t NumChannels>
|
||||
static void ApplyI3dl2ReverbEffect(I3dl2ReverbInfo::State& state,
|
||||
std::span<std::span<const s32>> inputs,
|
||||
std::span<std::span<s32>> outputs, const u32 sample_count) {
|
||||
constexpr static std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{
|
||||
static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
constexpr static std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{
|
||||
static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{
|
||||
0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1,
|
||||
};
|
||||
constexpr static std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{
|
||||
static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{
|
||||
0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 3, 3, 3,
|
||||
};
|
||||
constexpr static std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{
|
||||
static constexpr std::array<u8, I3dl2ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{
|
||||
2, 0, 0, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 0, 0, 0, 0, 5, 5, 5,
|
||||
};
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ static void ApplyLightLimiterEffect(const LightLimiterInfo::ParameterVersion2& p
|
||||
std::vector<std::span<const s32>>& inputs,
|
||||
std::vector<std::span<s32>>& outputs, const u32 sample_count,
|
||||
LightLimiterInfo::StatisticsInternal* statistics) {
|
||||
constexpr static s64 min{std::numeric_limits<s32>::min()};
|
||||
constexpr static s64 max{std::numeric_limits<s32>::max()};
|
||||
constexpr s64 min{std::numeric_limits<s32>::min()};
|
||||
constexpr s64 max{std::numeric_limits<s32>::max()};
|
||||
|
||||
const auto recip_estimate = [](f64 a) -> f64 {
|
||||
s32 q, s;
|
||||
|
||||
@@ -252,16 +252,16 @@ template <size_t NumChannels>
|
||||
static void ApplyReverbEffect(const ReverbInfo::ParameterVersion2& params, ReverbInfo::State& state,
|
||||
std::vector<std::span<const s32>>& inputs,
|
||||
std::vector<std::span<s32>>& outputs, const u32 sample_count) {
|
||||
constexpr static std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{
|
||||
static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes1Ch{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
constexpr static std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{
|
||||
static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes2Ch{
|
||||
0, 0, 1, 1, 0, 1, 0, 0, 1, 1,
|
||||
};
|
||||
constexpr static std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{
|
||||
static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes4Ch{
|
||||
0, 0, 1, 1, 0, 1, 2, 2, 3, 3,
|
||||
};
|
||||
constexpr static std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{
|
||||
static constexpr std::array<u8, ReverbInfo::MaxDelayTaps> OutTapIndexes6Ch{
|
||||
0, 0, 1, 1, 2, 2, 4, 4, 5, 5,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user