diff options
author | arades79 <scravers@protonmail.com> | 2023-02-14 17:13:47 +0100 |
---|---|---|
committer | arades79 <scravers@protonmail.com> | 2023-02-14 18:35:39 +0100 |
commit | 683019878fc939b418a65e1c5d84b066596d7655 (patch) | |
tree | 6b2a2e8ea34cb00a3fccf3613a52475550997035 /src/audio_core/sink | |
parent | apply clang-format (diff) | |
download | yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.gz yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.bz2 yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.lz yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.xz yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.zst yuzu-683019878fc939b418a65e1c5d84b066596d7655.zip |
Diffstat (limited to 'src/audio_core/sink')
-rw-r--r-- | src/audio_core/sink/sink_stream.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp index fa3cee3ea..2fb5f9758 100644 --- a/src/audio_core/sink/sink_stream.cpp +++ b/src/audio_core/sink/sink_stream.cpp @@ -24,8 +24,8 @@ void SinkStream::AppendBuffer(SinkBuffer& buffer, std::vector<s16>& samples) { return; } - constexpr static s32 min{std::numeric_limits<s16>::min()}; - constexpr static s32 max{std::numeric_limits<s16>::max()}; + constexpr s32 min{std::numeric_limits<s16>::min()}; + constexpr s32 max{std::numeric_limits<s16>::max()}; auto yuzu_volume{Settings::Volume()}; if (yuzu_volume > 1.0f) { @@ -35,7 +35,7 @@ void SinkStream::AppendBuffer(SinkBuffer& buffer, std::vector<s16>& samples) { if (system_channels == 6 && device_channels == 2) { // We're given 6 channels, but our device only outputs 2, so downmix. - constexpr static std::array<f32, 4> down_mix_coeff{1.0f, 0.707f, 0.251f, 0.707f}; + static constexpr std::array<f32, 4> down_mix_coeff{1.0f, 0.707f, 0.251f, 0.707f}; for (u32 read_index = 0, write_index = 0; read_index < samples.size(); read_index += system_channels, write_index += device_channels) { @@ -106,8 +106,8 @@ void SinkStream::AppendBuffer(SinkBuffer& buffer, std::vector<s16>& samples) { } std::vector<s16> SinkStream::ReleaseBuffer(u64 num_samples) { - constexpr static s32 min = std::numeric_limits<s16>::min(); - constexpr static s32 max = std::numeric_limits<s16>::max(); + constexpr s32 min = std::numeric_limits<s16>::min(); + constexpr s32 max = std::numeric_limits<s16>::max(); auto samples{samples_buffer.Pop(num_samples)}; @@ -202,7 +202,7 @@ void SinkStream::ProcessAudioOutAndRender(std::span<s16> output_buffer, std::siz // If we're paused or going to shut down, we don't want to consume buffers as coretiming is // paused and we'll desync, so just play silence. if (system.IsPaused() || system.IsShuttingDown()) { - constexpr static std::array<s16, 6> silence{}; + static constexpr std::array<s16, 6> silence{}; for (size_t i = frames_written; i < num_frames; i++) { std::memcpy(&output_buffer[i * frame_size], &silence[0], frame_size_bytes); } |