summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2022-09-04 06:41:06 +0200
committerKelebek1 <eeeedddccc@hotmail.co.uk>2022-09-04 06:41:06 +0200
commit2129d040a509754839b82b1ff6d387cb4f84f168 (patch)
treedcbc4edfb20e70e4c22566193c802ea2f4b9979e /src/core
parentRework audio output, connecting AudioOut into coretiming to fix desync during heavy loads. (diff)
downloadyuzu-2129d040a509754839b82b1ff6d387cb4f84f168.tar
yuzu-2129d040a509754839b82b1ff6d387cb4f84f168.tar.gz
yuzu-2129d040a509754839b82b1ff6d387cb4f84f168.tar.bz2
yuzu-2129d040a509754839b82b1ff6d387cb4f84f168.tar.lz
yuzu-2129d040a509754839b82b1ff6d387cb4f84f168.tar.xz
yuzu-2129d040a509754839b82b1ff6d387cb4f84f168.tar.zst
yuzu-2129d040a509754839b82b1ff6d387cb4f84f168.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp
index 2a5128c60..a7385fce8 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#include "audio_core/audio_core.h"
#include "common/assert.h"
#include "common/logging/log.h"
#include "core/core.h"
@@ -65,7 +66,10 @@ NvResult nvhost_nvdec::Ioctl3(DeviceFD fd, Ioctl command, const std::vector<u8>&
return NvResult::NotImplemented;
}
-void nvhost_nvdec::OnOpen(DeviceFD fd) {}
+void nvhost_nvdec::OnOpen(DeviceFD fd) {
+ LOG_INFO(Service_NVDRV, "NVDEC video stream started");
+ system.AudioCore().SetNVDECActive(true);
+}
void nvhost_nvdec::OnClose(DeviceFD fd) {
LOG_INFO(Service_NVDRV, "NVDEC video stream ended");
@@ -73,6 +77,7 @@ void nvhost_nvdec::OnClose(DeviceFD fd) {
if (iter != fd_to_id.end()) {
system.GPU().ClearCdmaInstance(iter->second);
}
+ system.AudioCore().SetNVDECActive(false);
}
} // namespace Service::Nvidia::Devices