From 2e5a9cf119703a595c3e1e34aa233a9843f5871c Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 19 Feb 2024 23:43:00 -0500 Subject: audio: move IFinalOutputRecorderManager{,ForApplet} --- src/core/CMakeLists.txt | 8 ++-- src/core/hle/service/audio/audio.cpp | 10 +++-- src/core/hle/service/audio/audrec_a.cpp | 21 ----------- src/core/hle/service/audio/audrec_a.h | 20 ---------- src/core/hle/service/audio/audrec_u.cpp | 42 --------------------- src/core/hle/service/audio/audrec_u.h | 20 ---------- .../audio/final_output_recorder_manager.cpp | 43 ++++++++++++++++++++++ .../service/audio/final_output_recorder_manager.h | 20 ++++++++++ .../final_output_recorder_manager_for_applet.cpp | 22 +++++++++++ .../final_output_recorder_manager_for_applet.h | 21 +++++++++++ 10 files changed, 116 insertions(+), 111 deletions(-) delete mode 100644 src/core/hle/service/audio/audrec_a.cpp delete mode 100644 src/core/hle/service/audio/audrec_a.h delete mode 100644 src/core/hle/service/audio/audrec_u.cpp delete mode 100644 src/core/hle/service/audio/audrec_u.h create mode 100644 src/core/hle/service/audio/final_output_recorder_manager.cpp create mode 100644 src/core/hle/service/audio/final_output_recorder_manager.h create mode 100644 src/core/hle/service/audio/final_output_recorder_manager_for_applet.cpp create mode 100644 src/core/hle/service/audio/final_output_recorder_manager_for_applet.h (limited to 'src') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index c0f828bce..68b940af3 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -501,13 +501,13 @@ add_library(core STATIC hle/service/audio/audio.h hle/service/audio/audio_controller.cpp hle/service/audio/audio_controller.h - hle/service/audio/audrec_a.cpp - hle/service/audio/audrec_a.h - hle/service/audio/audrec_u.cpp - hle/service/audio/audrec_u.h hle/service/audio/audren_u.cpp hle/service/audio/audren_u.h hle/service/audio/errors.h + hle/service/audio/final_output_recorder_manager_for_applet.cpp + hle/service/audio/final_output_recorder_manager_for_applet.h + hle/service/audio/final_output_recorder_manager.cpp + hle/service/audio/final_output_recorder_manager.h hle/service/audio/hwopus.cpp hle/service/audio/hwopus.h hle/service/bcat/backend/backend.cpp diff --git a/src/core/hle/service/audio/audio.cpp b/src/core/hle/service/audio/audio.cpp index aa5b9dbfe..02773aee5 100644 --- a/src/core/hle/service/audio/audio.cpp +++ b/src/core/hle/service/audio/audio.cpp @@ -6,9 +6,9 @@ #include "core/hle/service/audio/audio_controller.h" #include "core/hle/service/audio/audio_in_manager.h" #include "core/hle/service/audio/audio_out_manager.h" -#include "core/hle/service/audio/audrec_a.h" -#include "core/hle/service/audio/audrec_u.h" #include "core/hle/service/audio/audren_u.h" +#include "core/hle/service/audio/final_output_recorder_manager.h" +#include "core/hle/service/audio/final_output_recorder_manager_for_applet.h" #include "core/hle/service/audio/hwopus.h" #include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" @@ -21,8 +21,10 @@ void LoopProcess(Core::System& system) { server_manager->RegisterNamedService("audctl", std::make_shared(system)); server_manager->RegisterNamedService("audin:u", std::make_shared(system)); server_manager->RegisterNamedService("audout:u", std::make_shared(system)); - server_manager->RegisterNamedService("audrec:a", std::make_shared(system)); - server_manager->RegisterNamedService("audrec:u", std::make_shared(system)); + server_manager->RegisterNamedService( + "audrec:a", std::make_shared(system)); + server_manager->RegisterNamedService("audrec:u", + std::make_shared(system)); server_manager->RegisterNamedService("audren:u", std::make_shared(system)); server_manager->RegisterNamedService("hwopus", std::make_shared(system)); ServerManager::RunServer(std::move(server_manager)); diff --git a/src/core/hle/service/audio/audrec_a.cpp b/src/core/hle/service/audio/audrec_a.cpp deleted file mode 100644 index fa82e9ac7..000000000 --- a/src/core/hle/service/audio/audrec_a.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/audio/audrec_a.h" - -namespace Service::Audio { - -AudRecA::AudRecA(Core::System& system_) : ServiceFramework{system_, "audrec:a"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "RequestSuspend"}, - {1, nullptr, "RequestResume"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - -AudRecA::~AudRecA() = default; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/audrec_a.h b/src/core/hle/service/audio/audrec_a.h deleted file mode 100644 index 9edf89f6c..000000000 --- a/src/core/hle/service/audio/audrec_a.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "core/hle/service/service.h" - -namespace Core { -class System; -} - -namespace Service::Audio { - -class AudRecA final : public ServiceFramework { -public: - explicit AudRecA(Core::System& system_); - ~AudRecA() override; -}; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/audrec_u.cpp b/src/core/hle/service/audio/audrec_u.cpp deleted file mode 100644 index bc55cec17..000000000 --- a/src/core/hle/service/audio/audrec_u.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/audio/audrec_u.h" - -namespace Service::Audio { - -class IFinalOutputRecorder final : public ServiceFramework { -public: - explicit IFinalOutputRecorder(Core::System& system_) - : ServiceFramework{system_, "IFinalOutputRecorder"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetFinalOutputRecorderState"}, - {1, nullptr, "Start"}, - {2, nullptr, "Stop"}, - {3, nullptr, "AppendFinalOutputRecorderBuffer"}, - {4, nullptr, "RegisterBufferEvent"}, - {5, nullptr, "GetReleasedFinalOutputRecorderBuffers"}, - {6, nullptr, "ContainsFinalOutputRecorderBuffer"}, - {7, nullptr, "GetFinalOutputRecorderBufferEndTime"}, - {8, nullptr, "AppendFinalOutputRecorderBufferAuto"}, - {9, nullptr, "GetReleasedFinalOutputRecorderBufferAuto"}, - {10, nullptr, "FlushFinalOutputRecorderBuffers"}, - {11, nullptr, "AttachWorkBuffer"}, - }; - // clang-format on - - RegisterHandlers(functions); - } -}; - -AudRecU::AudRecU(Core::System& system_) : ServiceFramework{system_, "audrec:u"} { - static const FunctionInfo functions[] = { - {0, nullptr, "OpenFinalOutputRecorder"}, - }; - RegisterHandlers(functions); -} - -AudRecU::~AudRecU() = default; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/audrec_u.h b/src/core/hle/service/audio/audrec_u.h deleted file mode 100644 index 8b4817884..000000000 --- a/src/core/hle/service/audio/audrec_u.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "core/hle/service/service.h" - -namespace Core { -class System; -} - -namespace Service::Audio { - -class AudRecU final : public ServiceFramework { -public: - explicit AudRecU(Core::System& system_); - ~AudRecU() override; -}; - -} // namespace Service::Audio diff --git a/src/core/hle/service/audio/final_output_recorder_manager.cpp b/src/core/hle/service/audio/final_output_recorder_manager.cpp new file mode 100644 index 000000000..f70a0e62d --- /dev/null +++ b/src/core/hle/service/audio/final_output_recorder_manager.cpp @@ -0,0 +1,43 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/audio/final_output_recorder_manager.h" + +namespace Service::Audio { + +class IFinalOutputRecorder final : public ServiceFramework { +public: + explicit IFinalOutputRecorder(Core::System& system_) + : ServiceFramework{system_, "IFinalOutputRecorder"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "GetFinalOutputRecorderState"}, + {1, nullptr, "Start"}, + {2, nullptr, "Stop"}, + {3, nullptr, "AppendFinalOutputRecorderBuffer"}, + {4, nullptr, "RegisterBufferEvent"}, + {5, nullptr, "GetReleasedFinalOutputRecorderBuffers"}, + {6, nullptr, "ContainsFinalOutputRecorderBuffer"}, + {7, nullptr, "GetFinalOutputRecorderBufferEndTime"}, + {8, nullptr, "AppendFinalOutputRecorderBufferAuto"}, + {9, nullptr, "GetReleasedFinalOutputRecorderBufferAuto"}, + {10, nullptr, "FlushFinalOutputRecorderBuffers"}, + {11, nullptr, "AttachWorkBuffer"}, + }; + // clang-format on + + RegisterHandlers(functions); + } +}; + +IFinalOutputRecorderManager::IFinalOutputRecorderManager(Core::System& system_) + : ServiceFramework{system_, "audrec:u"} { + static const FunctionInfo functions[] = { + {0, nullptr, "OpenFinalOutputRecorder"}, + }; + RegisterHandlers(functions); +} + +IFinalOutputRecorderManager::~IFinalOutputRecorderManager() = default; + +} // namespace Service::Audio diff --git a/src/core/hle/service/audio/final_output_recorder_manager.h b/src/core/hle/service/audio/final_output_recorder_manager.h new file mode 100644 index 000000000..0663b894e --- /dev/null +++ b/src/core/hle/service/audio/final_output_recorder_manager.h @@ -0,0 +1,20 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/service.h" + +namespace Core { +class System; +} + +namespace Service::Audio { + +class IFinalOutputRecorderManager final : public ServiceFramework { +public: + explicit IFinalOutputRecorderManager(Core::System& system_); + ~IFinalOutputRecorderManager() override; +}; + +} // namespace Service::Audio diff --git a/src/core/hle/service/audio/final_output_recorder_manager_for_applet.cpp b/src/core/hle/service/audio/final_output_recorder_manager_for_applet.cpp new file mode 100644 index 000000000..7e2e42bbe --- /dev/null +++ b/src/core/hle/service/audio/final_output_recorder_manager_for_applet.cpp @@ -0,0 +1,22 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/audio/final_output_recorder_manager_for_applet.h" + +namespace Service::Audio { + +IFinalOutputRecorderManagerForApplet::IFinalOutputRecorderManagerForApplet(Core::System& system_) + : ServiceFramework{system_, "audrec:a"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "RequestSuspend"}, + {1, nullptr, "RequestResume"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +IFinalOutputRecorderManagerForApplet::~IFinalOutputRecorderManagerForApplet() = default; + +} // namespace Service::Audio diff --git a/src/core/hle/service/audio/final_output_recorder_manager_for_applet.h b/src/core/hle/service/audio/final_output_recorder_manager_for_applet.h new file mode 100644 index 000000000..27940f7e0 --- /dev/null +++ b/src/core/hle/service/audio/final_output_recorder_manager_for_applet.h @@ -0,0 +1,21 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/service.h" + +namespace Core { +class System; +} + +namespace Service::Audio { + +class IFinalOutputRecorderManagerForApplet final + : public ServiceFramework { +public: + explicit IFinalOutputRecorderManagerForApplet(Core::System& system_); + ~IFinalOutputRecorderManagerForApplet() override; +}; + +} // namespace Service::Audio -- cgit v1.2.3