mirror of https://git.suyu.dev/suyu/suyu
Added stubs for audio services. (#116)
* stubs for audout:u, audin:u, audrec:u, audren:u, codecctl and decoding tables with nullptr for future implementations * fixing the changes requested (remove private, explicit)merge-requests/60/head
parent
fdbb039427
commit
07355cf7cc
@ -0,0 +1,41 @@
|
||||
// Copyright 2018 yuzu emulator team
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
#include "core/hle/service/audio/audin_u.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Audio {
|
||||
|
||||
class IAudioIn final : public ServiceFramework<IAudioIn> {
|
||||
public:
|
||||
IAudioIn() : ServiceFramework("IAudioIn") {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0x0, nullptr, "GetAudioInState"},
|
||||
{0x1, nullptr, "StartAudioIn"},
|
||||
{0x2, nullptr, "StopAudioIn"},
|
||||
{0x3, nullptr, "AppendAudioInBuffer_1"},
|
||||
{0x4, nullptr, "RegisterBufferEvent"},
|
||||
{0x5, nullptr, "GetReleasedAudioInBuffer_1"},
|
||||
{0x6, nullptr, "ContainsAudioInBuffer"},
|
||||
{0x7, nullptr, "AppendAudioInBuffer_2"},
|
||||
{0x8, nullptr, "GetReleasedAudioInBuffer_2"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
~IAudioIn() = default;
|
||||
};
|
||||
|
||||
AudInU::AudInU() : ServiceFramework("audin:u") {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0x00000000, nullptr, "ListAudioIns"},
|
||||
{0x00000001, nullptr, "OpenAudioIn"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
} // namespace Audio
|
||||
} // namespace Service
|
@ -0,0 +1,23 @@
|
||||
// Copyright 2018 yuzu emulator team
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Kernel {
|
||||
class HLERequestContext;
|
||||
}
|
||||
|
||||
namespace Service {
|
||||
namespace Audio {
|
||||
|
||||
class AudInU final : public ServiceFramework<AudInU> {
|
||||
public:
|
||||
explicit AudInU();
|
||||
~AudInU() = default;
|
||||
};
|
||||
|
||||
} // namespace Audio
|
||||
} // namespace Service
|
@ -0,0 +1,38 @@
|
||||
// Copyright 2018 yuzu emulator team
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
#include "core/hle/service/audio/audrec_u.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Audio {
|
||||
|
||||
class IFinalOutputRecorder final : public ServiceFramework<IFinalOutputRecorder> {
|
||||
public:
|
||||
IFinalOutputRecorder() : ServiceFramework("IFinalOutputRecorder") {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0x0, nullptr, "GetFinalOutputRecorderState"},
|
||||
{0x1, nullptr, "StartFinalOutputRecorder"},
|
||||
{0x2, nullptr, "StopFinalOutputRecorder"},
|
||||
{0x3, nullptr, "AppendFinalOutputRecorderBuffer"},
|
||||
{0x4, nullptr, "RegisterBufferEvent"},
|
||||
{0x5, nullptr, "GetReleasedFinalOutputRecorderBuffer"},
|
||||
{0x6, nullptr, "ContainsFinalOutputRecorderBuffer"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
~IFinalOutputRecorder() = default;
|
||||
};
|
||||
|
||||
AudRecU::AudRecU() : ServiceFramework("audrec:u") {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0x00000000, nullptr, "OpenFinalOutputRecorder"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
} // namespace Audio
|
||||
} // namespace Service
|
@ -0,0 +1,23 @@
|
||||
// Copyright 2018 yuzu emulator team
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Kernel {
|
||||
class HLERequestContext;
|
||||
}
|
||||
|
||||
namespace Service {
|
||||
namespace Audio {
|
||||
|
||||
class AudRecU final : public ServiceFramework<AudRecU> {
|
||||
public:
|
||||
explicit AudRecU();
|
||||
~AudRecU() = default;
|
||||
};
|
||||
|
||||
} // namespace Audio
|
||||
} // namespace Service
|
@ -0,0 +1,44 @@
|
||||
// Copyright 2018 yuzu emulator team
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
#include "core/hle/service/audio/audren_u.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Audio {
|
||||
|
||||
class IAudioRenderer final : public ServiceFramework<IAudioRenderer> {
|
||||
public:
|
||||
IAudioRenderer() : ServiceFramework("IAudioRenderer") {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0x0, nullptr, "GetAudioRendererSampleRate"},
|
||||
{0x1, nullptr, "GetAudioRendererSampleCount"},
|
||||
{0x2, nullptr, "GetAudioRendererMixBufferCount"},
|
||||
{0x3, nullptr, "GetAudioRendererState"},
|
||||
{0x4, nullptr, "RequestUpdateAudioRenderer"},
|
||||
{0x5, nullptr, "StartAudioRenderer"},
|
||||
{0x6, nullptr, "StopAudioRenderer"},
|
||||
{0x7, nullptr, "QuerySystemEvent"},
|
||||
{0x8, nullptr, "SetAudioRendererRenderingTimeLimit"},
|
||||
{0x9, nullptr, "GetAudioRendererRenderingTimeLimit"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
~IAudioRenderer() = default;
|
||||
};
|
||||
|
||||
AudRenU::AudRenU() : ServiceFramework("audren:u") {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0x00000000, nullptr, "OpenAudioRenderer"},
|
||||
{0x00000001, nullptr, "GetAudioRendererWorkBufferSize"},
|
||||
{0x00000002, nullptr, "GetAudioRenderersProcessMasterVolume"},
|
||||
{0x00000003, nullptr, "SetAudioRenderersProcessMasterVolume"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
} // namespace Audio
|
||||
} // namespace Service
|
@ -0,0 +1,23 @@
|
||||
// Copyright 2018 yuzu emulator team
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Kernel {
|
||||
class HLERequestContext;
|
||||
}
|
||||
|
||||
namespace Service {
|
||||
namespace Audio {
|
||||
|
||||
class AudRenU final : public ServiceFramework<AudRenU> {
|
||||
public:
|
||||
explicit AudRenU();
|
||||
~AudRenU() = default;
|
||||
};
|
||||
|
||||
} // namespace Audio
|
||||
} // namespace Service
|
@ -0,0 +1,33 @@
|
||||
// Copyright 2018 yuzu emulator team
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/hle_ipc.h"
|
||||
#include "core/hle/service/audio/codecctl.h"
|
||||
|
||||
namespace Service {
|
||||
namespace Audio {
|
||||
|
||||
CodecCtl::CodecCtl() : ServiceFramework("codecctl") {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0x00000000, nullptr, "InitializeCodecController"},
|
||||
{0x00000001, nullptr, "FinalizeCodecController"},
|
||||
{0x00000002, nullptr, "SleepCodecController"},
|
||||
{0x00000003, nullptr, "WakeCodecController"},
|
||||
{0x00000004, nullptr, "SetCodecVolume"},
|
||||
{0x00000005, nullptr, "GetCodecVolumeMax"},
|
||||
{0x00000006, nullptr, "GetCodecVolumeMin"},
|
||||
{0x00000007, nullptr, "SetCodecActiveTarget"},
|
||||
{0x00000008, nullptr, "Unknown"},
|
||||
{0x00000009, nullptr, "BindCodecHeadphoneMicJackInterrupt"},
|
||||
{0x0000000A, nullptr, "IsCodecHeadphoneMicJackInserted"},
|
||||
{0x0000000B, nullptr, "ClearCodecHeadphoneMicJackInterrupt"},
|
||||
{0x0000000C, nullptr, "IsCodecDeviceRequested"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
} // namespace Audio
|
||||
} // namespace Service
|
@ -0,0 +1,23 @@
|
||||
// Copyright 2018 yuzu emulator team
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Kernel {
|
||||
class HLERequestContext;
|
||||
}
|
||||
|
||||
namespace Service {
|
||||
namespace Audio {
|
||||
|
||||
class CodecCtl final : public ServiceFramework<CodecCtl> {
|
||||
public:
|
||||
explicit CodecCtl();
|
||||
~CodecCtl() = default;
|
||||
};
|
||||
|
||||
} // namespace Audio
|
||||
} // namespace Service
|
Loading…
Reference in New Issue