mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-26 19:32:40 -06:00
Merge pull request #9232 from bunnei/audio-default-thread
hle: service: audio: Use default service thread.
This commit is contained in:
commit
3b9db85646
3 changed files with 12 additions and 18 deletions
|
@ -203,9 +203,8 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
AudInU::AudInU(Core::System& system_)
|
AudInU::AudInU(Core::System& system_)
|
||||||
: ServiceFramework{system_, "audin:u", ServiceThreadType::CreateNew},
|
: ServiceFramework{system_, "audin:u"}, service_context{system_, "AudInU"},
|
||||||
service_context{system_, "AudInU"}, impl{std::make_unique<AudioCore::AudioIn::Manager>(
|
impl{std::make_unique<AudioCore::AudioIn::Manager>(system_)} {
|
||||||
system_)} {
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &AudInU::ListAudioIns, "ListAudioIns"},
|
{0, &AudInU::ListAudioIns, "ListAudioIns"},
|
||||||
|
|
|
@ -26,9 +26,8 @@ public:
|
||||||
explicit IAudioOut(Core::System& system_, AudioCore::AudioOut::Manager& manager,
|
explicit IAudioOut(Core::System& system_, AudioCore::AudioOut::Manager& manager,
|
||||||
size_t session_id, const std::string& device_name,
|
size_t session_id, const std::string& device_name,
|
||||||
const AudioOutParameter& in_params, u32 handle, u64 applet_resource_user_id)
|
const AudioOutParameter& in_params, u32 handle, u64 applet_resource_user_id)
|
||||||
: ServiceFramework{system_, "IAudioOut", ServiceThreadType::CreateNew},
|
: ServiceFramework{system_, "IAudioOut"}, service_context{system_, "IAudioOut"},
|
||||||
service_context{system_, "IAudioOut"}, event{service_context.CreateEvent(
|
event{service_context.CreateEvent("AudioOutEvent")},
|
||||||
"AudioOutEvent")},
|
|
||||||
impl{std::make_shared<AudioCore::AudioOut::Out>(system_, manager, event, session_id)} {
|
impl{std::make_shared<AudioCore::AudioOut::Out>(system_, manager, event, session_id)} {
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
@ -221,9 +220,8 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
AudOutU::AudOutU(Core::System& system_)
|
AudOutU::AudOutU(Core::System& system_)
|
||||||
: ServiceFramework{system_, "audout:u", ServiceThreadType::CreateNew},
|
: ServiceFramework{system_, "audout:u"}, service_context{system_, "AudOutU"},
|
||||||
service_context{system_, "AudOutU"}, impl{std::make_unique<AudioCore::AudioOut::Manager>(
|
impl{std::make_unique<AudioCore::AudioOut::Manager>(system_)} {
|
||||||
system_)} {
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &AudOutU::ListAudioOuts, "ListAudioOuts"},
|
{0, &AudOutU::ListAudioOuts, "ListAudioOuts"},
|
||||||
|
|
|
@ -35,10 +35,9 @@ public:
|
||||||
AudioCore::AudioRendererParameterInternal& params,
|
AudioCore::AudioRendererParameterInternal& params,
|
||||||
Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size,
|
Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size,
|
||||||
u32 process_handle, u64 applet_resource_user_id, s32 session_id)
|
u32 process_handle, u64 applet_resource_user_id, s32 session_id)
|
||||||
: ServiceFramework{system_, "IAudioRenderer", ServiceThreadType::CreateNew},
|
: ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"},
|
||||||
service_context{system_, "IAudioRenderer"}, rendered_event{service_context.CreateEvent(
|
rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_},
|
||||||
"IAudioRendererEvent")},
|
impl{std::make_unique<Renderer>(system_, manager, rendered_event)} {
|
||||||
manager{manager_}, impl{std::make_unique<Renderer>(system_, manager, rendered_event)} {
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &IAudioRenderer::GetSampleRate, "GetSampleRate"},
|
{0, &IAudioRenderer::GetSampleRate, "GetSampleRate"},
|
||||||
|
@ -243,10 +242,8 @@ class IAudioDevice final : public ServiceFramework<IAudioDevice> {
|
||||||
public:
|
public:
|
||||||
explicit IAudioDevice(Core::System& system_, u64 applet_resource_user_id, u32 revision,
|
explicit IAudioDevice(Core::System& system_, u64 applet_resource_user_id, u32 revision,
|
||||||
u32 device_num)
|
u32 device_num)
|
||||||
: ServiceFramework{system_, "IAudioDevice", ServiceThreadType::CreateNew},
|
: ServiceFramework{system_, "IAudioDevice"}, service_context{system_, "IAudioDevice"},
|
||||||
service_context{system_, "IAudioDevice"}, impl{std::make_unique<AudioDevice>(
|
impl{std::make_unique<AudioDevice>(system_, applet_resource_user_id, revision)},
|
||||||
system_, applet_resource_user_id,
|
|
||||||
revision)},
|
|
||||||
event{service_context.CreateEvent(fmt::format("IAudioDeviceEvent-{}", device_num))} {
|
event{service_context.CreateEvent(fmt::format("IAudioDeviceEvent-{}", device_num))} {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &IAudioDevice::ListAudioDeviceName, "ListAudioDeviceName"},
|
{0, &IAudioDevice::ListAudioDeviceName, "ListAudioDeviceName"},
|
||||||
|
@ -421,7 +418,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
AudRenU::AudRenU(Core::System& system_)
|
AudRenU::AudRenU(Core::System& system_)
|
||||||
: ServiceFramework{system_, "audren:u", ServiceThreadType::CreateNew},
|
: ServiceFramework{system_, "audren:u"},
|
||||||
service_context{system_, "audren:u"}, impl{std::make_unique<Manager>(system_)} {
|
service_context{system_, "audren:u"}, impl{std::make_unique<Manager>(system_)} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
|
|
Loading…
Reference in a new issue