summaryrefslogtreecommitdiff
path: root/src/audio_core/hle/pipe.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core/hle/pipe.h')
-rw-r--r--src/audio_core/hle/pipe.h63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/audio_core/hle/pipe.h b/src/audio_core/hle/pipe.h
deleted file mode 100644
index ac053c029..000000000
--- a/src/audio_core/hle/pipe.h
+++ /dev/null
@@ -1,63 +0,0 @@
1// Copyright 2016 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <cstddef>
8#include <vector>
9#include "common/common_types.h"
10
11namespace DSP {
12namespace HLE {
13
14/// Reset the pipes by setting pipe positions back to the beginning.
15void ResetPipes();
16
17enum class DspPipe {
18 Debug = 0,
19 Dma = 1,
20 Audio = 2,
21 Binary = 3,
22};
23constexpr size_t NUM_DSP_PIPE = 8;
24
25/**
26 * Reads `length` bytes from the DSP pipe identified with `pipe_number`.
27 * @note Can read up to the maximum value of a u16 in bytes (65,535).
28 * @note IF an error is encoutered with either an invalid `pipe_number` or `length` value, an empty
29 * vector will be returned.
30 * @note IF `length` is set to 0, an empty vector will be returned.
31 * @note IF `length` is greater than the amount of data available, this function will only read the
32 * available amount.
33 * @param pipe_number a `DspPipe`
34 * @param length the number of bytes to read. The max is 65,535 (max of u16).
35 * @returns a vector of bytes from the specified pipe. On error, will be empty.
36 */
37std::vector<u8> PipeRead(DspPipe pipe_number, u32 length);
38
39/**
40 * How much data is left in pipe
41 * @param pipe_number The Pipe ID
42 * @return The amount of data remaning in the pipe. This is the maximum length PipeRead will return.
43 */
44size_t GetPipeReadableSize(DspPipe pipe_number);
45
46/**
47 * Write to a DSP pipe.
48 * @param pipe_number The Pipe ID
49 * @param buffer The data to write to the pipe.
50 */
51void PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer);
52
53enum class DspState {
54 Off,
55 On,
56 Sleeping,
57};
58
59/// Get the state of the DSP
60DspState GetDspState();
61
62} // namespace HLE
63} // namespace DSP