diff options
Diffstat (limited to 'src/core/hle/service/audio')
25 files changed, 87 insertions, 59 deletions
diff --git a/src/core/hle/service/audio/audctl.cpp b/src/core/hle/service/audio/audctl.cpp index 6ddb547fb..84890be72 100644 --- a/src/core/hle/service/audio/audctl.cpp +++ b/src/core/hle/service/audio/audctl.cpp | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | namespace Service::Audio { | 9 | namespace Service::Audio { |
| 10 | 10 | ||
| 11 | AudCtl::AudCtl() : ServiceFramework{"audctl"} { | 11 | AudCtl::AudCtl(Core::System& system_) : ServiceFramework{system_, "audctl"} { |
| 12 | // clang-format off | 12 | // clang-format off |
| 13 | static const FunctionInfo functions[] = { | 13 | static const FunctionInfo functions[] = { |
| 14 | {0, nullptr, "GetTargetVolume"}, | 14 | {0, nullptr, "GetTargetVolume"}, |
diff --git a/src/core/hle/service/audio/audctl.h b/src/core/hle/service/audio/audctl.h index c7fafc02e..15f6c77a0 100644 --- a/src/core/hle/service/audio/audctl.h +++ b/src/core/hle/service/audio/audctl.h | |||
| @@ -6,11 +6,15 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Core { | ||
| 10 | class System; | ||
| 11 | } | ||
| 12 | |||
| 9 | namespace Service::Audio { | 13 | namespace Service::Audio { |
| 10 | 14 | ||
| 11 | class AudCtl final : public ServiceFramework<AudCtl> { | 15 | class AudCtl final : public ServiceFramework<AudCtl> { |
| 12 | public: | 16 | public: |
| 13 | explicit AudCtl(); | 17 | explicit AudCtl(Core::System& system_); |
| 14 | ~AudCtl() override; | 18 | ~AudCtl() override; |
| 15 | 19 | ||
| 16 | private: | 20 | private: |
diff --git a/src/core/hle/service/audio/auddbg.cpp b/src/core/hle/service/audio/auddbg.cpp index 8fff3e4b4..6264e4bda 100644 --- a/src/core/hle/service/audio/auddbg.cpp +++ b/src/core/hle/service/audio/auddbg.cpp | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | namespace Service::Audio { | 7 | namespace Service::Audio { |
| 8 | 8 | ||
| 9 | AudDbg::AudDbg(const char* name) : ServiceFramework{name} { | 9 | AudDbg::AudDbg(Core::System& system_, const char* name) : ServiceFramework{system_, name} { |
| 10 | // clang-format off | 10 | // clang-format off |
| 11 | static const FunctionInfo functions[] = { | 11 | static const FunctionInfo functions[] = { |
| 12 | {0, nullptr, "RequestSuspendForDebug"}, | 12 | {0, nullptr, "RequestSuspendForDebug"}, |
diff --git a/src/core/hle/service/audio/auddbg.h b/src/core/hle/service/audio/auddbg.h index 6689f4759..d1653eedd 100644 --- a/src/core/hle/service/audio/auddbg.h +++ b/src/core/hle/service/audio/auddbg.h | |||
| @@ -6,11 +6,15 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Core { | ||
| 10 | class System; | ||
| 11 | } | ||
| 12 | |||
| 9 | namespace Service::Audio { | 13 | namespace Service::Audio { |
| 10 | 14 | ||
| 11 | class AudDbg final : public ServiceFramework<AudDbg> { | 15 | class AudDbg final : public ServiceFramework<AudDbg> { |
| 12 | public: | 16 | public: |
| 13 | explicit AudDbg(const char* name); | 17 | explicit AudDbg(Core::System& system_, const char* name); |
| 14 | ~AudDbg() override; | 18 | ~AudDbg() override; |
| 15 | }; | 19 | }; |
| 16 | 20 | ||
diff --git a/src/core/hle/service/audio/audin_a.cpp b/src/core/hle/service/audio/audin_a.cpp index ddd12f35e..79c3aa920 100644 --- a/src/core/hle/service/audio/audin_a.cpp +++ b/src/core/hle/service/audio/audin_a.cpp | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | namespace Service::Audio { | 7 | namespace Service::Audio { |
| 8 | 8 | ||
| 9 | AudInA::AudInA() : ServiceFramework{"audin:a"} { | 9 | AudInA::AudInA(Core::System& system_) : ServiceFramework{system_, "audin:a"} { |
| 10 | // clang-format off | 10 | // clang-format off |
| 11 | static const FunctionInfo functions[] = { | 11 | static const FunctionInfo functions[] = { |
| 12 | {0, nullptr, "RequestSuspendAudioIns"}, | 12 | {0, nullptr, "RequestSuspendAudioIns"}, |
diff --git a/src/core/hle/service/audio/audin_a.h b/src/core/hle/service/audio/audin_a.h index e7623bc29..15120a4b6 100644 --- a/src/core/hle/service/audio/audin_a.h +++ b/src/core/hle/service/audio/audin_a.h | |||
| @@ -6,11 +6,15 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Core { | ||
| 10 | class System; | ||
| 11 | } | ||
| 12 | |||
| 9 | namespace Service::Audio { | 13 | namespace Service::Audio { |
| 10 | 14 | ||
| 11 | class AudInA final : public ServiceFramework<AudInA> { | 15 | class AudInA final : public ServiceFramework<AudInA> { |
| 12 | public: | 16 | public: |
| 13 | explicit AudInA(); | 17 | explicit AudInA(Core::System& system_); |
| 14 | ~AudInA() override; | 18 | ~AudInA() override; |
| 15 | }; | 19 | }; |
| 16 | 20 | ||
diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index 3e2299426..26a6deddf 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp | |||
| @@ -11,7 +11,7 @@ namespace Service::Audio { | |||
| 11 | 11 | ||
| 12 | class IAudioIn final : public ServiceFramework<IAudioIn> { | 12 | class IAudioIn final : public ServiceFramework<IAudioIn> { |
| 13 | public: | 13 | public: |
| 14 | IAudioIn() : ServiceFramework("IAudioIn") { | 14 | explicit IAudioIn(Core::System& system_) : ServiceFramework{system_, "IAudioIn"} { |
| 15 | // clang-format off | 15 | // clang-format off |
| 16 | static const FunctionInfo functions[] = { | 16 | static const FunctionInfo functions[] = { |
| 17 | {0, nullptr, "GetAudioInState"}, | 17 | {0, nullptr, "GetAudioInState"}, |
| @@ -36,7 +36,7 @@ public: | |||
| 36 | } | 36 | } |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | AudInU::AudInU() : ServiceFramework("audin:u") { | 39 | AudInU::AudInU(Core::System& system_) : ServiceFramework{system_, "audin:u"} { |
| 40 | // clang-format off | 40 | // clang-format off |
| 41 | static const FunctionInfo functions[] = { | 41 | static const FunctionInfo functions[] = { |
| 42 | {0, &AudInU::ListAudioIns, "ListAudioIns"}, | 42 | {0, &AudInU::ListAudioIns, "ListAudioIns"}, |
| @@ -96,7 +96,7 @@ void AudInU::OpenInOutImpl(Kernel::HLERequestContext& ctx) { | |||
| 96 | IPC::ResponseBuilder rb{ctx, 6, 0, 1}; | 96 | IPC::ResponseBuilder rb{ctx, 6, 0, 1}; |
| 97 | rb.Push(RESULT_SUCCESS); | 97 | rb.Push(RESULT_SUCCESS); |
| 98 | rb.PushRaw<AudInOutParams>(params); | 98 | rb.PushRaw<AudInOutParams>(params); |
| 99 | rb.PushIpcInterface<IAudioIn>(); | 99 | rb.PushIpcInterface<IAudioIn>(system); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) { | 102 | void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) { |
diff --git a/src/core/hle/service/audio/audin_u.h b/src/core/hle/service/audio/audin_u.h index a599f4a64..0d75ae5ac 100644 --- a/src/core/hle/service/audio/audin_u.h +++ b/src/core/hle/service/audio/audin_u.h | |||
| @@ -6,6 +6,10 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Core { | ||
| 10 | class System; | ||
| 11 | } | ||
| 12 | |||
| 9 | namespace Kernel { | 13 | namespace Kernel { |
| 10 | class HLERequestContext; | 14 | class HLERequestContext; |
| 11 | } | 15 | } |
| @@ -14,7 +18,7 @@ namespace Service::Audio { | |||
| 14 | 18 | ||
| 15 | class AudInU final : public ServiceFramework<AudInU> { | 19 | class AudInU final : public ServiceFramework<AudInU> { |
| 16 | public: | 20 | public: |
| 17 | explicit AudInU(); | 21 | explicit AudInU(Core::System& system_); |
| 18 | ~AudInU() override; | 22 | ~AudInU() override; |
| 19 | 23 | ||
| 20 | private: | 24 | private: |
diff --git a/src/core/hle/service/audio/audio.cpp b/src/core/hle/service/audio/audio.cpp index 1781bec83..b3f24f9bb 100644 --- a/src/core/hle/service/audio/audio.cpp +++ b/src/core/hle/service/audio/audio.cpp | |||
| @@ -20,22 +20,22 @@ | |||
| 20 | namespace Service::Audio { | 20 | namespace Service::Audio { |
| 21 | 21 | ||
| 22 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { | 22 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { |
| 23 | std::make_shared<AudCtl>()->InstallAsService(service_manager); | 23 | std::make_shared<AudCtl>(system)->InstallAsService(service_manager); |
| 24 | std::make_shared<AudOutA>()->InstallAsService(service_manager); | 24 | std::make_shared<AudOutA>(system)->InstallAsService(service_manager); |
| 25 | std::make_shared<AudOutU>(system)->InstallAsService(service_manager); | 25 | std::make_shared<AudOutU>(system)->InstallAsService(service_manager); |
| 26 | std::make_shared<AudInA>()->InstallAsService(service_manager); | 26 | std::make_shared<AudInA>(system)->InstallAsService(service_manager); |
| 27 | std::make_shared<AudInU>()->InstallAsService(service_manager); | 27 | std::make_shared<AudInU>(system)->InstallAsService(service_manager); |
| 28 | std::make_shared<AudRecA>()->InstallAsService(service_manager); | 28 | std::make_shared<AudRecA>(system)->InstallAsService(service_manager); |
| 29 | std::make_shared<AudRecU>()->InstallAsService(service_manager); | 29 | std::make_shared<AudRecU>(system)->InstallAsService(service_manager); |
| 30 | std::make_shared<AudRenA>()->InstallAsService(service_manager); | 30 | std::make_shared<AudRenA>(system)->InstallAsService(service_manager); |
| 31 | std::make_shared<AudRenU>(system)->InstallAsService(service_manager); | 31 | std::make_shared<AudRenU>(system)->InstallAsService(service_manager); |
| 32 | std::make_shared<CodecCtl>()->InstallAsService(service_manager); | 32 | std::make_shared<CodecCtl>(system)->InstallAsService(service_manager); |
| 33 | std::make_shared<HwOpus>()->InstallAsService(service_manager); | 33 | std::make_shared<HwOpus>(system)->InstallAsService(service_manager); |
| 34 | 34 | ||
| 35 | std::make_shared<AudDbg>("audin:d")->InstallAsService(service_manager); | 35 | std::make_shared<AudDbg>(system, "audin:d")->InstallAsService(service_manager); |
| 36 | std::make_shared<AudDbg>("audout:d")->InstallAsService(service_manager); | 36 | std::make_shared<AudDbg>(system, "audout:d")->InstallAsService(service_manager); |
| 37 | std::make_shared<AudDbg>("audrec:d")->InstallAsService(service_manager); | 37 | std::make_shared<AudDbg>(system, "audrec:d")->InstallAsService(service_manager); |
| 38 | std::make_shared<AudDbg>("audren:d")->InstallAsService(service_manager); | 38 | std::make_shared<AudDbg>(system, "audren:d")->InstallAsService(service_manager); |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | } // namespace Service::Audio | 41 | } // namespace Service::Audio |
diff --git a/src/core/hle/service/audio/audout_a.cpp b/src/core/hle/service/audio/audout_a.cpp index 85febbca3..19825fd5d 100644 --- a/src/core/hle/service/audio/audout_a.cpp +++ b/src/core/hle/service/audio/audout_a.cpp | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | namespace Service::Audio { | 7 | namespace Service::Audio { |
| 8 | 8 | ||
| 9 | AudOutA::AudOutA() : ServiceFramework{"audout:a"} { | 9 | AudOutA::AudOutA(Core::System& system_) : ServiceFramework{system_, "audout:a"} { |
| 10 | // clang-format off | 10 | // clang-format off |
| 11 | static const FunctionInfo functions[] = { | 11 | static const FunctionInfo functions[] = { |
| 12 | {0, nullptr, "RequestSuspendAudioOuts"}, | 12 | {0, nullptr, "RequestSuspendAudioOuts"}, |
diff --git a/src/core/hle/service/audio/audout_a.h b/src/core/hle/service/audio/audout_a.h index d65b66e8e..2043dfb77 100644 --- a/src/core/hle/service/audio/audout_a.h +++ b/src/core/hle/service/audio/audout_a.h | |||
| @@ -6,11 +6,15 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Core { | ||
| 10 | class System; | ||
| 11 | } | ||
| 12 | |||
| 9 | namespace Service::Audio { | 13 | namespace Service::Audio { |
| 10 | 14 | ||
| 11 | class AudOutA final : public ServiceFramework<AudOutA> { | 15 | class AudOutA final : public ServiceFramework<AudOutA> { |
| 12 | public: | 16 | public: |
| 13 | explicit AudOutA(); | 17 | explicit AudOutA(Core::System& system_); |
| 14 | ~AudOutA() override; | 18 | ~AudOutA() override; |
| 15 | }; | 19 | }; |
| 16 | 20 | ||
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 9b4910e53..145f47ee2 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp | |||
| @@ -40,11 +40,11 @@ enum class AudioState : u32 { | |||
| 40 | 40 | ||
| 41 | class IAudioOut final : public ServiceFramework<IAudioOut> { | 41 | class IAudioOut final : public ServiceFramework<IAudioOut> { |
| 42 | public: | 42 | public: |
| 43 | IAudioOut(Core::System& system, AudoutParams audio_params, AudioCore::AudioOut& audio_core, | 43 | IAudioOut(Core::System& system_, AudoutParams audio_params_, AudioCore::AudioOut& audio_core_, |
| 44 | std::string&& device_name, std::string&& unique_name) | 44 | std::string&& device_name_, std::string&& unique_name) |
| 45 | : ServiceFramework("IAudioOut"), audio_core(audio_core), | 45 | : ServiceFramework{system_, "IAudioOut"}, audio_core{audio_core_}, |
| 46 | device_name(std::move(device_name)), | 46 | device_name{std::move(device_name_)}, audio_params{audio_params_}, main_memory{ |
| 47 | audio_params(audio_params), main_memory{system.Memory()} { | 47 | system.Memory()} { |
| 48 | // clang-format off | 48 | // clang-format off |
| 49 | static const FunctionInfo functions[] = { | 49 | static const FunctionInfo functions[] = { |
| 50 | {0, &IAudioOut::GetAudioOutState, "GetAudioOutState"}, | 50 | {0, &IAudioOut::GetAudioOutState, "GetAudioOutState"}, |
| @@ -213,7 +213,7 @@ private: | |||
| 213 | Core::Memory::Memory& main_memory; | 213 | Core::Memory::Memory& main_memory; |
| 214 | }; | 214 | }; |
| 215 | 215 | ||
| 216 | AudOutU::AudOutU(Core::System& system_) : ServiceFramework("audout:u"), system{system_} { | 216 | AudOutU::AudOutU(Core::System& system_) : ServiceFramework{system_, "audout:u"} { |
| 217 | // clang-format off | 217 | // clang-format off |
| 218 | static const FunctionInfo functions[] = { | 218 | static const FunctionInfo functions[] = { |
| 219 | {0, &AudOutU::ListAudioOutsImpl, "ListAudioOuts"}, | 219 | {0, &AudOutU::ListAudioOutsImpl, "ListAudioOuts"}, |
diff --git a/src/core/hle/service/audio/audout_u.h b/src/core/hle/service/audio/audout_u.h index c9f532ccd..f7ae2f2bf 100644 --- a/src/core/hle/service/audio/audout_u.h +++ b/src/core/hle/service/audio/audout_u.h | |||
| @@ -34,8 +34,6 @@ private: | |||
| 34 | 34 | ||
| 35 | std::vector<std::shared_ptr<IAudioOut>> audio_out_interfaces; | 35 | std::vector<std::shared_ptr<IAudioOut>> audio_out_interfaces; |
| 36 | std::unique_ptr<AudioCore::AudioOut> audio_core; | 36 | std::unique_ptr<AudioCore::AudioOut> audio_core; |
| 37 | |||
| 38 | Core::System& system; | ||
| 39 | }; | 37 | }; |
| 40 | 38 | ||
| 41 | } // namespace Service::Audio | 39 | } // namespace Service::Audio |
diff --git a/src/core/hle/service/audio/audrec_a.cpp b/src/core/hle/service/audio/audrec_a.cpp index ce1bfb48d..c5ab7cad4 100644 --- a/src/core/hle/service/audio/audrec_a.cpp +++ b/src/core/hle/service/audio/audrec_a.cpp | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | namespace Service::Audio { | 7 | namespace Service::Audio { |
| 8 | 8 | ||
| 9 | AudRecA::AudRecA() : ServiceFramework{"audrec:a"} { | 9 | AudRecA::AudRecA(Core::System& system_) : ServiceFramework{system_, "audrec:a"} { |
| 10 | // clang-format off | 10 | // clang-format off |
| 11 | static const FunctionInfo functions[] = { | 11 | static const FunctionInfo functions[] = { |
| 12 | {0, nullptr, "RequestSuspendFinalOutputRecorders"}, | 12 | {0, nullptr, "RequestSuspendFinalOutputRecorders"}, |
diff --git a/src/core/hle/service/audio/audrec_a.h b/src/core/hle/service/audio/audrec_a.h index 384d24c69..2cce90b1d 100644 --- a/src/core/hle/service/audio/audrec_a.h +++ b/src/core/hle/service/audio/audrec_a.h | |||
| @@ -6,11 +6,15 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Core { | ||
| 10 | class System; | ||
| 11 | } | ||
| 12 | |||
| 9 | namespace Service::Audio { | 13 | namespace Service::Audio { |
| 10 | 14 | ||
| 11 | class AudRecA final : public ServiceFramework<AudRecA> { | 15 | class AudRecA final : public ServiceFramework<AudRecA> { |
| 12 | public: | 16 | public: |
| 13 | explicit AudRecA(); | 17 | explicit AudRecA(Core::System& system_); |
| 14 | ~AudRecA() override; | 18 | ~AudRecA() override; |
| 15 | }; | 19 | }; |
| 16 | 20 | ||
diff --git a/src/core/hle/service/audio/audrec_u.cpp b/src/core/hle/service/audio/audrec_u.cpp index 1a5aed9ed..eb5c63c62 100644 --- a/src/core/hle/service/audio/audrec_u.cpp +++ b/src/core/hle/service/audio/audrec_u.cpp | |||
| @@ -8,7 +8,8 @@ namespace Service::Audio { | |||
| 8 | 8 | ||
| 9 | class IFinalOutputRecorder final : public ServiceFramework<IFinalOutputRecorder> { | 9 | class IFinalOutputRecorder final : public ServiceFramework<IFinalOutputRecorder> { |
| 10 | public: | 10 | public: |
| 11 | IFinalOutputRecorder() : ServiceFramework("IFinalOutputRecorder") { | 11 | explicit IFinalOutputRecorder(Core::System& system_) |
| 12 | : ServiceFramework{system_, "IFinalOutputRecorder"} { | ||
| 12 | // clang-format off | 13 | // clang-format off |
| 13 | static const FunctionInfo functions[] = { | 14 | static const FunctionInfo functions[] = { |
| 14 | {0, nullptr, "GetFinalOutputRecorderState"}, | 15 | {0, nullptr, "GetFinalOutputRecorderState"}, |
| @@ -29,7 +30,7 @@ public: | |||
| 29 | } | 30 | } |
| 30 | }; | 31 | }; |
| 31 | 32 | ||
| 32 | AudRecU::AudRecU() : ServiceFramework("audrec:u") { | 33 | AudRecU::AudRecU(Core::System& system_) : ServiceFramework{system_, "audrec:u"} { |
| 33 | static const FunctionInfo functions[] = { | 34 | static const FunctionInfo functions[] = { |
| 34 | {0, nullptr, "OpenFinalOutputRecorder"}, | 35 | {0, nullptr, "OpenFinalOutputRecorder"}, |
| 35 | }; | 36 | }; |
diff --git a/src/core/hle/service/audio/audrec_u.h b/src/core/hle/service/audio/audrec_u.h index ca3d638e8..f79d49e5c 100644 --- a/src/core/hle/service/audio/audrec_u.h +++ b/src/core/hle/service/audio/audrec_u.h | |||
| @@ -6,15 +6,15 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Kernel { | 9 | namespace Core { |
| 10 | class HLERequestContext; | 10 | class System; |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | namespace Service::Audio { | 13 | namespace Service::Audio { |
| 14 | 14 | ||
| 15 | class AudRecU final : public ServiceFramework<AudRecU> { | 15 | class AudRecU final : public ServiceFramework<AudRecU> { |
| 16 | public: | 16 | public: |
| 17 | explicit AudRecU(); | 17 | explicit AudRecU(Core::System& system_); |
| 18 | ~AudRecU() override; | 18 | ~AudRecU() override; |
| 19 | }; | 19 | }; |
| 20 | 20 | ||
diff --git a/src/core/hle/service/audio/audren_a.cpp b/src/core/hle/service/audio/audren_a.cpp index edb66d985..5e9f866f0 100644 --- a/src/core/hle/service/audio/audren_a.cpp +++ b/src/core/hle/service/audio/audren_a.cpp | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | namespace Service::Audio { | 7 | namespace Service::Audio { |
| 8 | 8 | ||
| 9 | AudRenA::AudRenA() : ServiceFramework{"audren:a"} { | 9 | AudRenA::AudRenA(Core::System& system_) : ServiceFramework{system_, "audren:a"} { |
| 10 | // clang-format off | 10 | // clang-format off |
| 11 | static const FunctionInfo functions[] = { | 11 | static const FunctionInfo functions[] = { |
| 12 | {0, nullptr, "RequestSuspendAudioRenderers"}, | 12 | {0, nullptr, "RequestSuspendAudioRenderers"}, |
diff --git a/src/core/hle/service/audio/audren_a.h b/src/core/hle/service/audio/audren_a.h index 81fef0ffe..5d0a626ad 100644 --- a/src/core/hle/service/audio/audren_a.h +++ b/src/core/hle/service/audio/audren_a.h | |||
| @@ -6,11 +6,15 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Core { | ||
| 10 | class System; | ||
| 11 | } | ||
| 12 | |||
| 9 | namespace Service::Audio { | 13 | namespace Service::Audio { |
| 10 | 14 | ||
| 11 | class AudRenA final : public ServiceFramework<AudRenA> { | 15 | class AudRenA final : public ServiceFramework<AudRenA> { |
| 12 | public: | 16 | public: |
| 13 | explicit AudRenA(); | 17 | explicit AudRenA(Core::System& system_); |
| 14 | ~AudRenA() override; | 18 | ~AudRenA() override; |
| 15 | }; | 19 | }; |
| 16 | 20 | ||
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index a2d3ded7b..6e7b7316c 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -28,7 +28,7 @@ class IAudioRenderer final : public ServiceFramework<IAudioRenderer> { | |||
| 28 | public: | 28 | public: |
| 29 | explicit IAudioRenderer(Core::System& system, AudioCommon::AudioRendererParameter audren_params, | 29 | explicit IAudioRenderer(Core::System& system, AudioCommon::AudioRendererParameter audren_params, |
| 30 | const std::size_t instance_number) | 30 | const std::size_t instance_number) |
| 31 | : ServiceFramework("IAudioRenderer") { | 31 | : ServiceFramework{system, "IAudioRenderer"} { |
| 32 | // clang-format off | 32 | // clang-format off |
| 33 | static const FunctionInfo functions[] = { | 33 | static const FunctionInfo functions[] = { |
| 34 | {0, &IAudioRenderer::GetSampleRate, "GetSampleRate"}, | 34 | {0, &IAudioRenderer::GetSampleRate, "GetSampleRate"}, |
| @@ -167,8 +167,8 @@ private: | |||
| 167 | 167 | ||
| 168 | class IAudioDevice final : public ServiceFramework<IAudioDevice> { | 168 | class IAudioDevice final : public ServiceFramework<IAudioDevice> { |
| 169 | public: | 169 | public: |
| 170 | explicit IAudioDevice(Core::System& system, u32_le revision_num) | 170 | explicit IAudioDevice(Core::System& system_, u32_le revision_num) |
| 171 | : ServiceFramework("IAudioDevice"), revision{revision_num} { | 171 | : ServiceFramework{system_, "IAudioDevice"}, revision{revision_num} { |
| 172 | static const FunctionInfo functions[] = { | 172 | static const FunctionInfo functions[] = { |
| 173 | {0, &IAudioDevice::ListAudioDeviceName, "ListAudioDeviceName"}, | 173 | {0, &IAudioDevice::ListAudioDeviceName, "ListAudioDeviceName"}, |
| 174 | {1, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolume"}, | 174 | {1, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolume"}, |
| @@ -325,7 +325,7 @@ private: | |||
| 325 | 325 | ||
| 326 | }; // namespace Audio | 326 | }; // namespace Audio |
| 327 | 327 | ||
| 328 | AudRenU::AudRenU(Core::System& system_) : ServiceFramework("audren:u"), system{system_} { | 328 | AudRenU::AudRenU(Core::System& system_) : ServiceFramework{system_, "audren:u"} { |
| 329 | // clang-format off | 329 | // clang-format off |
| 330 | static const FunctionInfo functions[] = { | 330 | static const FunctionInfo functions[] = { |
| 331 | {0, &AudRenU::OpenAudioRenderer, "OpenAudioRenderer"}, | 331 | {0, &AudRenU::OpenAudioRenderer, "OpenAudioRenderer"}, |
diff --git a/src/core/hle/service/audio/audren_u.h b/src/core/hle/service/audio/audren_u.h index 4e0ccc792..d693dc406 100644 --- a/src/core/hle/service/audio/audren_u.h +++ b/src/core/hle/service/audio/audren_u.h | |||
| @@ -31,7 +31,6 @@ private: | |||
| 31 | void OpenAudioRendererImpl(Kernel::HLERequestContext& ctx); | 31 | void OpenAudioRendererImpl(Kernel::HLERequestContext& ctx); |
| 32 | 32 | ||
| 33 | std::size_t audren_instance_count = 0; | 33 | std::size_t audren_instance_count = 0; |
| 34 | Core::System& system; | ||
| 35 | }; | 34 | }; |
| 36 | 35 | ||
| 37 | // Describes a particular audio feature that may be supported in a particular revision. | 36 | // Describes a particular audio feature that may be supported in a particular revision. |
diff --git a/src/core/hle/service/audio/codecctl.cpp b/src/core/hle/service/audio/codecctl.cpp index c6864146d..94afec1b6 100644 --- a/src/core/hle/service/audio/codecctl.cpp +++ b/src/core/hle/service/audio/codecctl.cpp | |||
| @@ -2,14 +2,11 @@ | |||
| 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 "common/logging/log.h" | ||
| 6 | #include "core/hle/ipc_helpers.h" | ||
| 7 | #include "core/hle/kernel/hle_ipc.h" | ||
| 8 | #include "core/hle/service/audio/codecctl.h" | 5 | #include "core/hle/service/audio/codecctl.h" |
| 9 | 6 | ||
| 10 | namespace Service::Audio { | 7 | namespace Service::Audio { |
| 11 | 8 | ||
| 12 | CodecCtl::CodecCtl() : ServiceFramework("codecctl") { | 9 | CodecCtl::CodecCtl(Core::System& system_) : ServiceFramework{system_, "codecctl"} { |
| 13 | static const FunctionInfo functions[] = { | 10 | static const FunctionInfo functions[] = { |
| 14 | {0, nullptr, "InitializeCodecController"}, | 11 | {0, nullptr, "InitializeCodecController"}, |
| 15 | {1, nullptr, "FinalizeCodecController"}, | 12 | {1, nullptr, "FinalizeCodecController"}, |
diff --git a/src/core/hle/service/audio/codecctl.h b/src/core/hle/service/audio/codecctl.h index 2fe75b6e2..58e53259e 100644 --- a/src/core/hle/service/audio/codecctl.h +++ b/src/core/hle/service/audio/codecctl.h | |||
| @@ -6,15 +6,15 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Kernel { | 9 | namespace Core { |
| 10 | class HLERequestContext; | 10 | class System; |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | namespace Service::Audio { | 13 | namespace Service::Audio { |
| 14 | 14 | ||
| 15 | class CodecCtl final : public ServiceFramework<CodecCtl> { | 15 | class CodecCtl final : public ServiceFramework<CodecCtl> { |
| 16 | public: | 16 | public: |
| 17 | explicit CodecCtl(); | 17 | explicit CodecCtl(Core::System& system_); |
| 18 | ~CodecCtl() override; | 18 | ~CodecCtl() override; |
| 19 | }; | 19 | }; |
| 20 | 20 | ||
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index f1d81602c..ea3414fd2 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp | |||
| @@ -160,8 +160,9 @@ private: | |||
| 160 | 160 | ||
| 161 | class IHardwareOpusDecoderManager final : public ServiceFramework<IHardwareOpusDecoderManager> { | 161 | class IHardwareOpusDecoderManager final : public ServiceFramework<IHardwareOpusDecoderManager> { |
| 162 | public: | 162 | public: |
| 163 | explicit IHardwareOpusDecoderManager(OpusDecoderState decoder_state) | 163 | explicit IHardwareOpusDecoderManager(Core::System& system_, OpusDecoderState decoder_state) |
| 164 | : ServiceFramework("IHardwareOpusDecoderManager"), decoder_state{std::move(decoder_state)} { | 164 | : ServiceFramework{system_, "IHardwareOpusDecoderManager"}, decoder_state{ |
| 165 | std::move(decoder_state)} { | ||
| 165 | // clang-format off | 166 | // clang-format off |
| 166 | static const FunctionInfo functions[] = { | 167 | static const FunctionInfo functions[] = { |
| 167 | {0, &IHardwareOpusDecoderManager::DecodeInterleavedOld, "DecodeInterleavedOld"}, | 168 | {0, &IHardwareOpusDecoderManager::DecodeInterleavedOld, "DecodeInterleavedOld"}, |
| @@ -287,10 +288,10 @@ void HwOpus::OpenOpusDecoder(Kernel::HLERequestContext& ctx) { | |||
| 287 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 288 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 288 | rb.Push(RESULT_SUCCESS); | 289 | rb.Push(RESULT_SUCCESS); |
| 289 | rb.PushIpcInterface<IHardwareOpusDecoderManager>( | 290 | rb.PushIpcInterface<IHardwareOpusDecoderManager>( |
| 290 | OpusDecoderState{std::move(decoder), sample_rate, channel_count}); | 291 | system, OpusDecoderState{std::move(decoder), sample_rate, channel_count}); |
| 291 | } | 292 | } |
| 292 | 293 | ||
| 293 | HwOpus::HwOpus() : ServiceFramework("hwopus") { | 294 | HwOpus::HwOpus(Core::System& system_) : ServiceFramework{system_, "hwopus"} { |
| 294 | static const FunctionInfo functions[] = { | 295 | static const FunctionInfo functions[] = { |
| 295 | {0, &HwOpus::OpenOpusDecoder, "OpenOpusDecoder"}, | 296 | {0, &HwOpus::OpenOpusDecoder, "OpenOpusDecoder"}, |
| 296 | {1, &HwOpus::GetWorkBufferSize, "GetWorkBufferSize"}, | 297 | {1, &HwOpus::GetWorkBufferSize, "GetWorkBufferSize"}, |
diff --git a/src/core/hle/service/audio/hwopus.h b/src/core/hle/service/audio/hwopus.h index 602ede8ba..4f921f18e 100644 --- a/src/core/hle/service/audio/hwopus.h +++ b/src/core/hle/service/audio/hwopus.h | |||
| @@ -6,11 +6,15 @@ | |||
| 6 | 6 | ||
| 7 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 8 | 8 | ||
| 9 | namespace Core { | ||
| 10 | class System; | ||
| 11 | } | ||
| 12 | |||
| 9 | namespace Service::Audio { | 13 | namespace Service::Audio { |
| 10 | 14 | ||
| 11 | class HwOpus final : public ServiceFramework<HwOpus> { | 15 | class HwOpus final : public ServiceFramework<HwOpus> { |
| 12 | public: | 16 | public: |
| 13 | explicit HwOpus(); | 17 | explicit HwOpus(Core::System& system_); |
| 14 | ~HwOpus() override; | 18 | ~HwOpus() override; |
| 15 | 19 | ||
| 16 | private: | 20 | private: |