diff options
| author | 2018-09-11 23:13:29 -0400 | |
|---|---|---|
| committer | 2018-09-11 23:13:29 -0400 | |
| commit | c2451504396bfb3476baa23ad2460d186c33d3ac (patch) | |
| tree | fb469ecb74fc29f0372400e42c9235b982a612d2 | |
| parent | Merge pull request #1278 from tech4me/bg-color-fix (diff) | |
| parent | service/audio: Replace includes with forward declarations where applicable (diff) | |
| download | yuzu-c2451504396bfb3476baa23ad2460d186c33d3ac.tar.gz yuzu-c2451504396bfb3476baa23ad2460d186c33d3ac.tar.xz yuzu-c2451504396bfb3476baa23ad2460d186c33d3ac.zip | |
Merge pull request #1300 from lioncash/audio
service/audio: Replace includes with forward declarations where applicable
| -rw-r--r-- | src/core/hle/service/audio/audio.cpp | 1 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audio.h | 4 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 17 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audout_u.h | 17 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audren_u.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/audio/hwopus.cpp | 5 |
7 files changed, 34 insertions, 17 deletions
diff --git a/src/core/hle/service/audio/audio.cpp b/src/core/hle/service/audio/audio.cpp index 6b5e15633..128df7db5 100644 --- a/src/core/hle/service/audio/audio.cpp +++ b/src/core/hle/service/audio/audio.cpp | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include "core/hle/service/audio/audren_u.h" | 15 | #include "core/hle/service/audio/audren_u.h" |
| 16 | #include "core/hle/service/audio/codecctl.h" | 16 | #include "core/hle/service/audio/codecctl.h" |
| 17 | #include "core/hle/service/audio/hwopus.h" | 17 | #include "core/hle/service/audio/hwopus.h" |
| 18 | #include "core/hle/service/service.h" | ||
| 18 | 19 | ||
| 19 | namespace Service::Audio { | 20 | namespace Service::Audio { |
| 20 | 21 | ||
diff --git a/src/core/hle/service/audio/audio.h b/src/core/hle/service/audio/audio.h index 95e5691f7..f5bd3bf5f 100644 --- a/src/core/hle/service/audio/audio.h +++ b/src/core/hle/service/audio/audio.h | |||
| @@ -4,7 +4,9 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | namespace Service::SM { |
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 8 | 10 | ||
| 9 | namespace Service::Audio { | 11 | namespace Service::Audio { |
| 10 | 12 | ||
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 05100ca8f..80a002322 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp | |||
| @@ -3,15 +3,20 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <array> | 5 | #include <array> |
| 6 | #include <cstring> | ||
| 6 | #include <vector> | 7 | #include <vector> |
| 7 | 8 | ||
| 9 | #include "audio_core/audio_out.h" | ||
| 8 | #include "audio_core/codec.h" | 10 | #include "audio_core/codec.h" |
| 11 | #include "common/common_funcs.h" | ||
| 9 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/swap.h" | ||
| 10 | #include "core/core.h" | 14 | #include "core/core.h" |
| 11 | #include "core/hle/ipc_helpers.h" | 15 | #include "core/hle/ipc_helpers.h" |
| 12 | #include "core/hle/kernel/event.h" | 16 | #include "core/hle/kernel/event.h" |
| 13 | #include "core/hle/kernel/hle_ipc.h" | 17 | #include "core/hle/kernel/hle_ipc.h" |
| 14 | #include "core/hle/service/audio/audout_u.h" | 18 | #include "core/hle/service/audio/audout_u.h" |
| 19 | #include "core/memory.h" | ||
| 15 | 20 | ||
| 16 | namespace Service::Audio { | 21 | namespace Service::Audio { |
| 17 | 22 | ||
| @@ -25,6 +30,18 @@ enum { | |||
| 25 | constexpr std::array<char, 10> DefaultDevice{{"DeviceOut"}}; | 30 | constexpr std::array<char, 10> DefaultDevice{{"DeviceOut"}}; |
| 26 | constexpr int DefaultSampleRate{48000}; | 31 | constexpr int DefaultSampleRate{48000}; |
| 27 | 32 | ||
| 33 | struct AudoutParams { | ||
| 34 | s32_le sample_rate; | ||
| 35 | u16_le channel_count; | ||
| 36 | INSERT_PADDING_BYTES(2); | ||
| 37 | }; | ||
| 38 | static_assert(sizeof(AudoutParams) == 0x8, "AudoutParams is an invalid size"); | ||
| 39 | |||
| 40 | enum class AudioState : u32 { | ||
| 41 | Started, | ||
| 42 | Stopped, | ||
| 43 | }; | ||
| 44 | |||
| 28 | class IAudioOut final : public ServiceFramework<IAudioOut> { | 45 | class IAudioOut final : public ServiceFramework<IAudioOut> { |
| 29 | public: | 46 | public: |
| 30 | IAudioOut(AudoutParams audio_params, AudioCore::AudioOut& audio_core) | 47 | IAudioOut(AudoutParams audio_params, AudioCore::AudioOut& audio_core) |
diff --git a/src/core/hle/service/audio/audout_u.h b/src/core/hle/service/audio/audout_u.h index aa52d3855..dcaf64708 100644 --- a/src/core/hle/service/audio/audout_u.h +++ b/src/core/hle/service/audio/audout_u.h | |||
| @@ -4,27 +4,18 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "audio_core/audio_out.h" | ||
| 8 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 9 | 8 | ||
| 9 | namespace AudioCore { | ||
| 10 | class AudioOut; | ||
| 11 | } | ||
| 12 | |||
| 10 | namespace Kernel { | 13 | namespace Kernel { |
| 11 | class HLERequestContext; | 14 | class HLERequestContext; |
| 12 | } | 15 | } |
| 13 | 16 | ||
| 14 | namespace Service::Audio { | 17 | namespace Service::Audio { |
| 15 | 18 | ||
| 16 | struct AudoutParams { | ||
| 17 | s32_le sample_rate; | ||
| 18 | u16_le channel_count; | ||
| 19 | INSERT_PADDING_BYTES(2); | ||
| 20 | }; | ||
| 21 | static_assert(sizeof(AudoutParams) == 0x8, "AudoutParams is an invalid size"); | ||
| 22 | |||
| 23 | enum class AudioState : u32 { | ||
| 24 | Started, | ||
| 25 | Stopped, | ||
| 26 | }; | ||
| 27 | |||
| 28 | class IAudioOut; | 19 | class IAudioOut; |
| 29 | 20 | ||
| 30 | class AudOutU final : public ServiceFramework<AudOutU> { | 21 | class AudOutU final : public ServiceFramework<AudOutU> { |
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 3870bec65..e84c4fa2b 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -2,12 +2,14 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | ||
| 5 | #include <array> | 6 | #include <array> |
| 7 | #include <memory> | ||
| 6 | 8 | ||
| 9 | #include "audio_core/audio_renderer.h" | ||
| 7 | #include "common/alignment.h" | 10 | #include "common/alignment.h" |
| 11 | #include "common/common_funcs.h" | ||
| 8 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 9 | #include "core/core_timing.h" | ||
| 10 | #include "core/core_timing_util.h" | ||
| 11 | #include "core/hle/ipc_helpers.h" | 13 | #include "core/hle/ipc_helpers.h" |
| 12 | #include "core/hle/kernel/event.h" | 14 | #include "core/hle/kernel/event.h" |
| 13 | #include "core/hle/kernel/hle_ipc.h" | 15 | #include "core/hle/kernel/hle_ipc.h" |
diff --git a/src/core/hle/service/audio/audren_u.h b/src/core/hle/service/audio/audren_u.h index 85a995a2f..c6bc3a90a 100644 --- a/src/core/hle/service/audio/audren_u.h +++ b/src/core/hle/service/audio/audren_u.h | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "audio_core/audio_renderer.h" | ||
| 8 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 9 | 8 | ||
| 10 | namespace Kernel { | 9 | namespace Kernel { |
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index 341bfda42..668fef145 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp | |||
| @@ -3,7 +3,12 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include <memory> | ||
| 7 | #include <vector> | ||
| 8 | |||
| 6 | #include <opus.h> | 9 | #include <opus.h> |
| 10 | |||
| 11 | #include "common/common_funcs.h" | ||
| 7 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 8 | #include "core/hle/ipc_helpers.h" | 13 | #include "core/hle/ipc_helpers.h" |
| 9 | #include "core/hle/kernel/hle_ipc.h" | 14 | #include "core/hle/kernel/hle_ipc.h" |