From 2e4a6b7f92fbf73eb5173c9bda5c9b5b61f5458c Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 20 Feb 2024 22:18:57 -0500 Subject: [PATCH] audio: format --- src/CMakeLists.txt | 1 + src/audio_core/opus/parameters.h | 4 ++-- src/audio_core/renderer/behavior/info_updater.cpp | 7 ++++--- src/audio_core/renderer/memory/pool_mapper.cpp | 4 ++-- src/core/hle/service/audio/audio_in.cpp | 5 +++-- src/core/hle/service/audio/audio_in_manager.cpp | 4 ++-- src/core/hle/service/audio/audio_renderer.cpp | 4 ++-- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index edca221b16..cf05a3fe3b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -121,6 +121,7 @@ else() -Wno-attributes -Wno-invalid-offsetof -Wno-unused-parameter + -Wno-missing-field-initializers ) if (CMAKE_CXX_COMPILER_ID MATCHES Clang) # Clang or AppleClang diff --git a/src/audio_core/opus/parameters.h b/src/audio_core/opus/parameters.h index 4c54b28250..47c418b9fc 100644 --- a/src/audio_core/opus/parameters.h +++ b/src/audio_core/opus/parameters.h @@ -20,7 +20,7 @@ struct OpusParametersEx { /* 0x00 */ u32 sample_rate; /* 0x04 */ u32 channel_count; /* 0x08 */ bool use_large_frame_size; - /* 0x09 */ INSERT_PADDING_BYTES(7); + /* 0x09 */ INSERT_PADDING_BYTES_NOINIT(7); }; // size = 0x10 static_assert(sizeof(OpusParametersEx) == 0x10, "OpusParametersEx has the wrong size!"); @@ -40,7 +40,7 @@ struct OpusMultiStreamParametersEx { /* 0x08 */ u32 total_stream_count; /* 0x0C */ u32 stereo_stream_count; /* 0x10 */ bool use_large_frame_size; - /* 0x11 */ INSERT_PADDING_BYTES(7); + /* 0x11 */ INSERT_PADDING_BYTES_NOINIT(7); /* 0x18 */ std::array mappings; }; // size = 0x118 static_assert(sizeof(OpusMultiStreamParametersEx) == 0x118, diff --git a/src/audio_core/renderer/behavior/info_updater.cpp b/src/audio_core/renderer/behavior/info_updater.cpp index 163127789c..3dae6069f7 100644 --- a/src/audio_core/renderer/behavior/info_updater.cpp +++ b/src/audio_core/renderer/behavior/info_updater.cpp @@ -19,9 +19,10 @@ namespace AudioCore::Renderer { InfoUpdater::InfoUpdater(std::span input_, std::span output_, Kernel::KProcess* process_handle_, BehaviorInfo& behaviour_) - : input{input_.data() + sizeof(UpdateDataHeader)}, input_origin{input_}, - output{output_.data() + sizeof(UpdateDataHeader)}, output_origin{output_}, - in_header{reinterpret_cast(input_origin.data())}, + : input{input_.data() + sizeof(UpdateDataHeader)}, + input_origin{input_}, output{output_.data() + sizeof(UpdateDataHeader)}, + output_origin{output_}, in_header{reinterpret_cast( + input_origin.data())}, out_header{reinterpret_cast(output_origin.data())}, expected_input_size{input_.size()}, expected_output_size{output_.size()}, process_handle{process_handle_}, behaviour{behaviour_} { diff --git a/src/audio_core/renderer/memory/pool_mapper.cpp b/src/audio_core/renderer/memory/pool_mapper.cpp index 1df786feb5..e47eb66d51 100644 --- a/src/audio_core/renderer/memory/pool_mapper.cpp +++ b/src/audio_core/renderer/memory/pool_mapper.cpp @@ -13,8 +13,8 @@ PoolMapper::PoolMapper(Kernel::KProcess* process_handle_, bool force_map_) PoolMapper::PoolMapper(Kernel::KProcess* process_handle_, std::span pool_infos_, u32 pool_count_, bool force_map_) - : process_handle{process_handle_}, pool_infos{pool_infos_.data()}, pool_count{pool_count_}, - force_map{force_map_} {} + : process_handle{process_handle_}, pool_infos{pool_infos_.data()}, + pool_count{pool_count_}, force_map{force_map_} {} void PoolMapper::ClearUseState(std::span pools, const u32 count) { for (u32 i = 0; i < count; i++) { diff --git a/src/core/hle/service/audio/audio_in.cpp b/src/core/hle/service/audio/audio_in.cpp index 9240cc3363..416803acc3 100644 --- a/src/core/hle/service/audio/audio_in.cpp +++ b/src/core/hle/service/audio/audio_in.cpp @@ -12,8 +12,9 @@ IAudioIn::IAudioIn(Core::System& system_, Manager& manager, size_t session_id, const std::string& device_name, const AudioInParameter& in_params, Kernel::KProcess* handle, u64 applet_resource_user_id) : ServiceFramework{system_, "IAudioIn"}, process{handle}, service_context{system_, "IAudioIn"}, - event{service_context.CreateEvent("AudioInEvent")}, - impl{std::make_shared(system_, manager, event, session_id)} { + event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared(system_, + manager, event, + session_id)} { // clang-format off static const FunctionInfo functions[] = { {0, D<&IAudioIn::GetAudioInState>, "GetAudioInState"}, diff --git a/src/core/hle/service/audio/audio_in_manager.cpp b/src/core/hle/service/audio/audio_in_manager.cpp index d55da17c84..2675a57735 100644 --- a/src/core/hle/service/audio/audio_in_manager.cpp +++ b/src/core/hle/service/audio/audio_in_manager.cpp @@ -10,8 +10,8 @@ namespace Service::Audio { using namespace AudioCore::AudioIn; IAudioInManager::IAudioInManager(Core::System& system_) - : ServiceFramework{system_, "audin:u"}, - impl{std::make_unique(system_)} { + : ServiceFramework{system_, "audin:u"}, impl{std::make_unique( + system_)} { // clang-format off static const FunctionInfo functions[] = { {0, D<&IAudioInManager::ListAudioIns>, "ListAudioIns"}, diff --git a/src/core/hle/service/audio/audio_renderer.cpp b/src/core/hle/service/audio/audio_renderer.cpp index b78660cea6..fc4aad2339 100644 --- a/src/core/hle/service/audio/audio_renderer.cpp +++ b/src/core/hle/service/audio/audio_renderer.cpp @@ -14,8 +14,8 @@ IAudioRenderer::IAudioRenderer(Core::System& system_, Manager& manager_, s32 session_id) : ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"}, rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_}, - impl{std::make_unique(system_, manager, rendered_event)}, - process_handle{process_handle_} { + impl{std::make_unique(system_, manager, rendered_event)}, process_handle{ + process_handle_} { // clang-format off static const FunctionInfo functions[] = { {0, D<&IAudioRenderer::GetSampleRate>, "GetSampleRate"},