early-access version 1851

This commit is contained in:
pineappleEA 2021-07-06 21:46:38 +02:00
parent 4591272f77
commit ff212b81f1
7 changed files with 18 additions and 11 deletions

View file

@ -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

View file

@ -82,6 +82,7 @@ else()
-Werror=missing-declarations
-Werror=missing-field-initializers
-Werror=reorder
-Werror=sign-compare
-Werror=switch
-Werror=uninitialized
-Werror=unused-function

View file

@ -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

View file

@ -1036,10 +1036,24 @@ s32 CommandGenerator::DecodePcm(ServerVoiceInfo& voice_info, VoiceState& dsp_sta
sample_buffer[mix_offset + i] = static_cast<s32>(buffer[i * channel_count + channel] *
std::numeric_limits<s16>::max());
}
} else {
} else if constexpr (sizeof(T) == 1) {
for (std::size_t i = 0; i < static_cast<std::size_t>(samples_processed); i++) {
sample_buffer[mix_offset + i] =
static_cast<s32>(static_cast<f32>(buffer[i * channel_count + channel] /
std::numeric_limits<s8>::max()) *
std::numeric_limits<s16>::max());
}
} else if constexpr (sizeof(T) == 2) {
for (std::size_t i = 0; i < static_cast<std::size_t>(samples_processed); i++) {
sample_buffer[mix_offset + i] = buffer[i * channel_count + channel];
}
} else {
for (std::size_t i = 0; i < static_cast<std::size_t>(samples_processed); i++) {
sample_buffer[mix_offset + i] =
static_cast<s32>(static_cast<f32>(buffer[i * channel_count + channel] /
std::numeric_limits<s32>::max()) *
std::numeric_limits<s16>::max());
}
}
return samples_processed;

View file

@ -669,8 +669,6 @@ else()
target_compile_options(core PRIVATE
-Werror=conversion
-Werror=ignored-qualifiers
-Werror=implicit-fallthrough
-Werror=sign-compare
-Werror=shadow
$<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess>

View file

@ -290,7 +290,7 @@ private:
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.Push<u32>(1);
rb.Push<u32>(2);
}
// Should be similar to QueryAudioDeviceOutputEvent

View file

@ -44,10 +44,7 @@ else()
-Werror
-Werror=conversion
-Werror=ignored-qualifiers
-Werror=implicit-fallthrough
-Werror=reorder
-Werror=shadow
-Werror=sign-compare
$<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter>
$<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable>
-Werror=unused-variable