aboutsummaryrefslogtreecommitdiff
path: root/src/audio_core/hle/pipe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core/hle/pipe.cpp')
-rw-r--r--src/audio_core/hle/pipe.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/audio_core/hle/pipe.cpp b/src/audio_core/hle/pipe.cpp
index 44dff1345..b472c81d8 100644
--- a/src/audio_core/hle/pipe.cpp
+++ b/src/audio_core/hle/pipe.cpp
@@ -4,14 +4,11 @@
#include <array>
#include <vector>
-
#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 {
@@ -44,8 +41,10 @@ std::vector<u8> PipeRead(DspPipe pipe_number, u32 length) {
std::vector<u8>& 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<u32>(data.size());
}
@@ -95,7 +94,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.
@@ -112,7 +111,8 @@ void PipeWrite(DspPipe pipe_number, const std::vector<u8>& 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;
}
@@ -120,7 +120,7 @@ void PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer) {
Initalize = 0,
Shutdown = 1,
Wakeup = 2,
- Sleep = 3
+ Sleep = 3,
};
// The difference between Initialize and Wakeup is that Input state is maintained
@@ -152,7 +152,9 @@ void PipeWrite(DspPipe pipe_number, const std::vector<u8>& 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 +162,8 @@ void PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer) {
return;
}
default:
- LOG_CRITICAL(Audio_DSP, "pipe_number = %zu unimplemented", static_cast<size_t>(pipe_number));
+ LOG_CRITICAL(Audio_DSP, "pipe_number = %zu unimplemented",
+ static_cast<size_t>(pipe_number));
UNIMPLEMENTED();
return;
}