diff options
author | Lioncash <mathew1800@gmail.com> | 2019-11-26 22:29:34 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-11-27 03:55:39 +0100 |
commit | b05bfc603689419dc515a656b9fc711d79994f13 (patch) | |
tree | bc0937d11bbe31458785a69478edbf11a720b0ae /src/core/hle/service/audio/audout_u.cpp | |
parent | core/memory: Migrate over ZeroBlock() and CopyBlock() to the Memory class (diff) | |
download | yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar.gz yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar.bz2 yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar.lz yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar.xz yuzu-b05bfc603689419dc515a656b9fc711d79994f13.tar.zst yuzu-b05bfc603689419dc515a656b9fc711d79994f13.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/audio/audout_u.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index 6a29377e3..4fb2cbc4b 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -43,7 +43,8 @@ public: IAudioOut(Core::System& system, AudoutParams audio_params, AudioCore::AudioOut& audio_core, std::string&& device_name, std::string&& unique_name) : ServiceFramework("IAudioOut"), audio_core(audio_core), - device_name(std::move(device_name)), audio_params(audio_params) { + device_name(std::move(device_name)), + audio_params(audio_params), main_memory{system.Memory()} { // clang-format off static const FunctionInfo functions[] = { {0, &IAudioOut::GetAudioOutState, "GetAudioOutState"}, @@ -137,7 +138,7 @@ private: const u64 tag{rp.Pop<u64>()}; std::vector<s16> samples(audio_buffer.buffer_size / sizeof(s16)); - Memory::ReadBlock(audio_buffer.buffer, samples.data(), audio_buffer.buffer_size); + main_memory.ReadBlock(audio_buffer.buffer, samples.data(), audio_buffer.buffer_size); if (!audio_core.QueueBuffer(stream, tag, std::move(samples))) { IPC::ResponseBuilder rb{ctx, 2}; @@ -209,6 +210,7 @@ private: /// This is the event handle used to check if the audio buffer was released Kernel::EventPair buffer_event; + Memory::Memory& main_memory; }; AudOutU::AudOutU(Core::System& system_) : ServiceFramework("audout:u"), system{system_} { |