From ff212b81f1df4494e081464db5ac719ea9c4f1c9 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Tue, 6 Jul 2021 21:46:38 +0200 Subject: [PATCH] early-access version 1851 --- README.md | 2 +- src/CMakeLists.txt | 1 + src/audio_core/CMakeLists.txt | 3 --- src/audio_core/command_generator.cpp | 16 +++++++++++++++- src/core/CMakeLists.txt | 2 -- src/core/hle/service/audio/audren_u.cpp | 2 +- src/input_common/CMakeLists.txt | 3 --- 7 files changed, 18 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b8765bfe8..39e51f0ec 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1850. +This is the source code for early-access 1851. ## Legal Notice diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 65a4922ea..f8ec8fea8 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -82,6 +82,7 @@ else() -Werror=missing-declarations -Werror=missing-field-initializers -Werror=reorder + -Werror=sign-compare -Werror=switch -Werror=uninitialized -Werror=unused-function diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index d25a1a645..090dd19b1 100755 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt @@ -51,9 +51,6 @@ if (NOT MSVC) target_compile_options(audio_core PRIVATE -Werror=conversion -Werror=ignored-qualifiers - -Werror=implicit-fallthrough - -Werror=reorder - -Werror=sign-compare -Werror=shadow -Werror=unused-parameter -Werror=unused-variable diff --git a/src/audio_core/command_generator.cpp b/src/audio_core/command_generator.cpp index 15ee1b319..b3250be09 100755 --- a/src/audio_core/command_generator.cpp +++ b/src/audio_core/command_generator.cpp @@ -1036,10 +1036,24 @@ s32 CommandGenerator::DecodePcm(ServerVoiceInfo& voice_info, VoiceState& dsp_sta sample_buffer[mix_offset + i] = static_cast(buffer[i * channel_count + channel] * std::numeric_limits::max()); } - } else { + } else if constexpr (sizeof(T) == 1) { + for (std::size_t i = 0; i < static_cast(samples_processed); i++) { + sample_buffer[mix_offset + i] = + static_cast(static_cast(buffer[i * channel_count + channel] / + std::numeric_limits::max()) * + std::numeric_limits::max()); + } + } else if constexpr (sizeof(T) == 2) { for (std::size_t i = 0; i < static_cast(samples_processed); i++) { sample_buffer[mix_offset + i] = buffer[i * channel_count + channel]; } + } else { + for (std::size_t i = 0; i < static_cast(samples_processed); i++) { + sample_buffer[mix_offset + i] = + static_cast(static_cast(buffer[i * channel_count + channel] / + std::numeric_limits::max()) * + std::numeric_limits::max()); + } } return samples_processed; diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index c83072a3d..377f07139 100755 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -669,8 +669,6 @@ else() target_compile_options(core PRIVATE -Werror=conversion -Werror=ignored-qualifiers - -Werror=implicit-fallthrough - -Werror=sign-compare -Werror=shadow $<$:-Werror=class-memaccess> diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 7583d68b2..b769fe959 100755 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp @@ -290,7 +290,7 @@ private: IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); - rb.Push(1); + rb.Push(2); } // Should be similar to QueryAudioDeviceOutputEvent diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index c3423c815..c4283a952 100755 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -44,10 +44,7 @@ else() -Werror -Werror=conversion -Werror=ignored-qualifiers - -Werror=implicit-fallthrough - -Werror=reorder -Werror=shadow - -Werror=sign-compare $<$:-Werror=unused-but-set-parameter> $<$:-Werror=unused-but-set-variable> -Werror=unused-variable