summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/audio
diff options
context:
space:
mode:
authorZach Hilman <DarkLordZach@users.noreply.github.com>2019-06-19 16:29:42 +0200
committerGitHub <noreply@github.com>2019-06-19 16:29:42 +0200
commit5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb (patch)
tree59fbc197a941e8a363cef85a3f75b2293c3c3bff /src/core/hle/service/audio
parentMerge pull request #2562 from ReinUsesLisp/split-cbuf-upload (diff)
parentAddressed issues (diff)
downloadyuzu-5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb.tar
yuzu-5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb.tar.gz
yuzu-5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb.tar.bz2
yuzu-5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb.tar.lz
yuzu-5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb.tar.xz
yuzu-5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb.tar.zst
yuzu-5c665fcc5b3086d8b7d6d84ccdec5356ec58f5fb.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/audio/audout_u.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp
index 6ba41b20a..7db6eb08d 100644
--- a/src/core/hle/service/audio/audout_u.cpp
+++ b/src/core/hle/service/audio/audout_u.cpp
@@ -58,8 +58,8 @@ public:
{9, &IAudioOut::GetAudioOutBufferCount, "GetAudioOutBufferCount"},
{10, nullptr, "GetAudioOutPlayedSampleCount"},
{11, nullptr, "FlushAudioOutBuffers"},
- {12, nullptr, "SetAudioOutVolume"},
- {13, nullptr, "GetAudioOutVolume"},
+ {12, &IAudioOut::SetAudioOutVolume, "SetAudioOutVolume"},
+ {13, &IAudioOut::GetAudioOutVolume, "GetAudioOutVolume"},
};
// clang-format on
RegisterHandlers(functions);
@@ -183,6 +183,25 @@ private:
rb.Push(static_cast<u32>(stream->GetQueueSize()));
}
+ void SetAudioOutVolume(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+ const float volume = rp.Pop<float>();
+ LOG_DEBUG(Service_Audio, "called, volume={}", volume);
+
+ stream->SetVolume(volume);
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+ }
+
+ void GetAudioOutVolume(Kernel::HLERequestContext& ctx) {
+ LOG_DEBUG(Service_Audio, "called");
+
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push(stream->GetVolume());
+ }
+
AudioCore::AudioOut& audio_core;
AudioCore::StreamPtr stream;
std::string device_name;