From dc8479928c5aee4c6ad6fe4f59006fb604cee701 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 18 Sep 2016 09:38:01 +0900 Subject: Sources: Run clang-format on everything. --- src/audio_core/hle/pipe.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/audio_core/hle/pipe.cpp') diff --git a/src/audio_core/hle/pipe.cpp b/src/audio_core/hle/pipe.cpp index 44dff1345..fe67d2503 100644 --- a/src/audio_core/hle/pipe.cpp +++ b/src/audio_core/hle/pipe.cpp @@ -44,8 +44,10 @@ std::vector PipeRead(DspPipe pipe_number, u32 length) { std::vector& data = pipe_data[pipe_index]; if (length > data.size()) { - LOG_WARNING(Audio_DSP, "pipe_number = %zu is out of data, application requested read of %u but %zu remain", - pipe_index, length, data.size()); + LOG_WARNING( + Audio_DSP, + "pipe_number = %zu is out of data, application requested read of %u but %zu remain", + pipe_index, length, data.size()); length = static_cast(data.size()); } @@ -95,8 +97,7 @@ static void AudioPipeWriteStructAddresses() { 0x8000 + offsetof(SharedMemory, unknown11) / 2, 0x8000 + offsetof(SharedMemory, unknown12) / 2, 0x8000 + offsetof(SharedMemory, unknown13) / 2, - 0x8000 + offsetof(SharedMemory, unknown14) / 2 - }; + 0x8000 + offsetof(SharedMemory, unknown14) / 2}; // Begin with a u16 denoting the number of structs. WriteU16(DspPipe::Audio, static_cast(struct_addresses.size())); @@ -112,16 +113,12 @@ void PipeWrite(DspPipe pipe_number, const std::vector& buffer) { switch (pipe_number) { case DspPipe::Audio: { if (buffer.size() != 4) { - LOG_ERROR(Audio_DSP, "DspPipe::Audio: Unexpected buffer length %zu was written", buffer.size()); + LOG_ERROR(Audio_DSP, "DspPipe::Audio: Unexpected buffer length %zu was written", + buffer.size()); return; } - enum class StateChange { - Initalize = 0, - Shutdown = 1, - Wakeup = 2, - Sleep = 3 - }; + enum class StateChange { Initalize = 0, Shutdown = 1, Wakeup = 2, Sleep = 3 }; // The difference between Initialize and Wakeup is that Input state is maintained // when sleeping but isn't when turning it off and on again. (TODO: Implement this.) @@ -152,7 +149,9 @@ void PipeWrite(DspPipe pipe_number, const std::vector& buffer) { dsp_state = DspState::Sleeping; break; default: - LOG_ERROR(Audio_DSP, "Application has requested unknown state transition of DSP hardware %hhu", buffer[0]); + LOG_ERROR(Audio_DSP, + "Application has requested unknown state transition of DSP hardware %hhu", + buffer[0]); dsp_state = DspState::Off; break; } @@ -160,7 +159,8 @@ void PipeWrite(DspPipe pipe_number, const std::vector& buffer) { return; } default: - LOG_CRITICAL(Audio_DSP, "pipe_number = %zu unimplemented", static_cast(pipe_number)); + LOG_CRITICAL(Audio_DSP, "pipe_number = %zu unimplemented", + static_cast(pipe_number)); UNIMPLEMENTED(); return; } -- cgit v1.2.3 From 396a8d91a4423d9c793eeff0798d544613647511 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 18 Sep 2016 18:01:46 -0700 Subject: Manually tweak source formatting and then re-run clang-format --- src/audio_core/hle/pipe.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/audio_core/hle/pipe.cpp') diff --git a/src/audio_core/hle/pipe.cpp b/src/audio_core/hle/pipe.cpp index fe67d2503..f2b6d6552 100644 --- a/src/audio_core/hle/pipe.cpp +++ b/src/audio_core/hle/pipe.cpp @@ -97,7 +97,8 @@ static void AudioPipeWriteStructAddresses() { 0x8000 + offsetof(SharedMemory, unknown11) / 2, 0x8000 + offsetof(SharedMemory, unknown12) / 2, 0x8000 + offsetof(SharedMemory, unknown13) / 2, - 0x8000 + offsetof(SharedMemory, unknown14) / 2}; + 0x8000 + offsetof(SharedMemory, unknown14) / 2, + }; // Begin with a u16 denoting the number of structs. WriteU16(DspPipe::Audio, static_cast(struct_addresses.size())); @@ -118,7 +119,12 @@ void PipeWrite(DspPipe pipe_number, const std::vector& buffer) { return; } - enum class StateChange { Initalize = 0, Shutdown = 1, Wakeup = 2, Sleep = 3 }; + enum class StateChange { + Initalize = 0, + Shutdown = 1, + Wakeup = 2, + Sleep = 3, + }; // The difference between Initialize and Wakeup is that Input state is maintained // when sleeping but isn't when turning it off and on again. (TODO: Implement this.) -- cgit v1.2.3 From ebdae19fd226104baec712b9da9939ff82ef3c3a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 21 Sep 2016 00:21:23 +0900 Subject: Remove empty newlines in #include blocks. This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation. --- src/audio_core/hle/pipe.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/audio_core/hle/pipe.cpp') diff --git a/src/audio_core/hle/pipe.cpp b/src/audio_core/hle/pipe.cpp index f2b6d6552..cab30c8aa 100644 --- a/src/audio_core/hle/pipe.cpp +++ b/src/audio_core/hle/pipe.cpp @@ -2,16 +2,13 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include "audio_core/hle/pipe.h" #include #include - #include "audio_core/hle/dsp.h" -#include "audio_core/hle/pipe.h" - #include "common/assert.h" #include "common/common_types.h" #include "common/logging/log.h" - #include "core/hle/service/dsp_dsp.h" namespace DSP { -- cgit v1.2.3 From 84fbbe26297652d994d203bde543ec252c2d801a Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Tue, 20 Sep 2016 23:52:38 -0700 Subject: Use negative priorities to avoid special-casing the self-include --- src/audio_core/hle/pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/audio_core/hle/pipe.cpp') diff --git a/src/audio_core/hle/pipe.cpp b/src/audio_core/hle/pipe.cpp index cab30c8aa..b472c81d8 100644 --- a/src/audio_core/hle/pipe.cpp +++ b/src/audio_core/hle/pipe.cpp @@ -2,10 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "audio_core/hle/pipe.h" #include #include #include "audio_core/hle/dsp.h" +#include "audio_core/hle/pipe.h" #include "common/assert.h" #include "common/common_types.h" #include "common/logging/log.h" -- cgit v1.2.3