mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-29 01:15:42 +00:00
audin_u: stub Start, RegisterBufferEvent, AppendAudioInBufferAuto
This also moves IAudioIn's definition to the header. Required for Splatoon 2 LAN play.
This commit is contained in:
parent
081ccc6441
commit
17b0955f9a
|
@ -9,32 +9,52 @@
|
||||||
|
|
||||||
namespace Service::Audio {
|
namespace Service::Audio {
|
||||||
|
|
||||||
class IAudioIn final : public ServiceFramework<IAudioIn> {
|
IAudioIn::IAudioIn(Core::System& system_) : ServiceFramework{system_, "IAudioIn"} {
|
||||||
public:
|
// clang-format off
|
||||||
explicit IAudioIn(Core::System& system_) : ServiceFramework{system_, "IAudioIn"} {
|
static const FunctionInfo functions[] = {
|
||||||
// clang-format off
|
{0, nullptr, "GetAudioInState"},
|
||||||
static const FunctionInfo functions[] = {
|
{1, &IAudioIn::Start, "Start"},
|
||||||
{0, nullptr, "GetAudioInState"},
|
{2, nullptr, "Stop"},
|
||||||
{1, nullptr, "Start"},
|
{3, nullptr, "AppendAudioInBuffer"},
|
||||||
{2, nullptr, "Stop"},
|
{4, &IAudioIn::RegisterBufferEvent, "RegisterBufferEvent"},
|
||||||
{3, nullptr, "AppendAudioInBuffer"},
|
{5, nullptr, "GetReleasedAudioInBuffer"},
|
||||||
{4, nullptr, "RegisterBufferEvent"},
|
{6, nullptr, "ContainsAudioInBuffer"},
|
||||||
{5, nullptr, "GetReleasedAudioInBuffer"},
|
{7, nullptr, "AppendUacInBuffer"},
|
||||||
{6, nullptr, "ContainsAudioInBuffer"},
|
{8, &IAudioIn::AppendAudioInBufferAuto, "AppendAudioInBufferAuto"},
|
||||||
{7, nullptr, "AppendUacInBuffer"},
|
{9, nullptr, "GetReleasedAudioInBuffersAuto"},
|
||||||
{8, nullptr, "AppendAudioInBufferAuto"},
|
{10, nullptr, "AppendUacInBufferAuto"},
|
||||||
{9, nullptr, "GetReleasedAudioInBuffersAuto"},
|
{11, nullptr, "GetAudioInBufferCount"},
|
||||||
{10, nullptr, "AppendUacInBufferAuto"},
|
{12, nullptr, "SetDeviceGain"},
|
||||||
{11, nullptr, "GetAudioInBufferCount"},
|
{13, nullptr, "GetDeviceGain"},
|
||||||
{12, nullptr, "SetDeviceGain"},
|
{14, nullptr, "FlushAudioInBuffers"},
|
||||||
{13, nullptr, "GetDeviceGain"},
|
};
|
||||||
{14, nullptr, "FlushAudioInBuffers"},
|
// clang-format on
|
||||||
};
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
IAudioIn::~IAudioIn() = default;
|
||||||
|
|
||||||
|
void IAudioIn::Start(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_Audio, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IAudioIn::RegisterBufferEvent(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_Audio, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IAudioIn::AppendAudioInBufferAuto(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_Audio, "(STUBBED) called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
AudInU::AudInU(Core::System& system_) : ServiceFramework{system_, "audin:u"} {
|
AudInU::AudInU(Core::System& system_) : ServiceFramework{system_, "audin:u"} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
|
|
@ -16,6 +16,17 @@ class HLERequestContext;
|
||||||
|
|
||||||
namespace Service::Audio {
|
namespace Service::Audio {
|
||||||
|
|
||||||
|
class IAudioIn final : public ServiceFramework<IAudioIn> {
|
||||||
|
public:
|
||||||
|
explicit IAudioIn(Core::System& system_);
|
||||||
|
~IAudioIn() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void Start(Kernel::HLERequestContext& ctx);
|
||||||
|
void RegisterBufferEvent(Kernel::HLERequestContext& ctx);
|
||||||
|
void AppendAudioInBufferAuto(Kernel::HLERequestContext& ctx);
|
||||||
|
};
|
||||||
|
|
||||||
class AudInU final : public ServiceFramework<AudInU> {
|
class AudInU final : public ServiceFramework<AudInU> {
|
||||||
public:
|
public:
|
||||||
explicit AudInU(Core::System& system_);
|
explicit AudInU(Core::System& system_);
|
||||||
|
|
Loading…
Reference in a new issue