Skip to content
Snippets Groups Projects
Unverified Commit 4cafc24a authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #1035 from ogniK5377/audio-dev-revision-info

GetAudioDeviceServiceWithRevisionInfo (Used by Bloodstained: Curse of the Moon)
parents 68c44ca0 66f4f86a
No related branches found
No related tags found
No related merge requests found
...@@ -190,7 +190,8 @@ AudRenU::AudRenU() : ServiceFramework("audren:u") { ...@@ -190,7 +190,8 @@ AudRenU::AudRenU() : ServiceFramework("audren:u") {
{1, &AudRenU::GetAudioRendererWorkBufferSize, "GetAudioRendererWorkBufferSize"}, {1, &AudRenU::GetAudioRendererWorkBufferSize, "GetAudioRendererWorkBufferSize"},
{2, &AudRenU::GetAudioDevice, "GetAudioDevice"}, {2, &AudRenU::GetAudioDevice, "GetAudioDevice"},
{3, nullptr, "OpenAudioRendererAuto"}, {3, nullptr, "OpenAudioRendererAuto"},
{4, nullptr, "GetAudioDeviceServiceWithRevisionInfo"}, {4, &AudRenU::GetAudioDeviceServiceWithRevisionInfo,
"GetAudioDeviceServiceWithRevisionInfo"},
}; };
RegisterHandlers(functions); RegisterHandlers(functions);
} }
...@@ -274,6 +275,16 @@ void AudRenU::GetAudioDevice(Kernel::HLERequestContext& ctx) { ...@@ -274,6 +275,16 @@ void AudRenU::GetAudioDevice(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_Audio, "called"); LOG_DEBUG(Service_Audio, "called");
} }
void AudRenU::GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);
rb.PushIpcInterface<Audio::IAudioDevice>();
LOG_WARNING(Service_Audio, "(STUBBED) called"); // TODO(ogniK): Figure out what is different
// based on the current revision
}
bool AudRenU::IsFeatureSupported(AudioFeatures feature, u32_le revision) const { bool AudRenU::IsFeatureSupported(AudioFeatures feature, u32_le revision) const {
u32_be version_num = (revision - Common::MakeMagic('R', 'E', 'V', '0')); // Byte swap u32_be version_num = (revision - Common::MakeMagic('R', 'E', 'V', '0')); // Byte swap
switch (feature) { switch (feature) {
......
...@@ -22,6 +22,7 @@ private: ...@@ -22,6 +22,7 @@ private:
void OpenAudioRenderer(Kernel::HLERequestContext& ctx); void OpenAudioRenderer(Kernel::HLERequestContext& ctx);
void GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx); void GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx);
void GetAudioDevice(Kernel::HLERequestContext& ctx); void GetAudioDevice(Kernel::HLERequestContext& ctx);
void GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& ctx);
enum class AudioFeatures : u32 { enum class AudioFeatures : u32 {
Splitter, Splitter,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment