Audio works

This commit is contained in:
SimoneN64
2024-01-22 18:37:02 +01:00
parent b358862314
commit 7caa8c25c5
12 changed files with 22 additions and 121 deletions

View File

@@ -1,6 +1,7 @@
#include <ParallelRDPWrapper.hpp>
#include <EmuThread.hpp>
#include <RenderWidget.hpp>
#include "Audio.hpp"
EmuThread::EmuThread(std::unique_ptr<QtInstanceFactory>&& instance, std::unique_ptr<Vulkan::WSIPlatform>&& wsiPlatform, std::unique_ptr<ParallelRdpWindowInfo>&& windowInfo, QObject* parent_object) noexcept
: QThread(parent_object), instance(std::move(instance)), wsiPlatform(std::move(wsiPlatform)), windowInfo(std::move(windowInfo)) {}
@@ -8,15 +9,16 @@ EmuThread::EmuThread(std::unique_ptr<QtInstanceFactory>&& instance, std::unique_
[[noreturn]] void EmuThread::run() noexcept {
LoadWSIPlatform(instance.get(), std::move(wsiPlatform), std::move(windowInfo));
LoadParallelRDP(core->cpu->mem.GetRDRAM());
n64::InitAudio();
while (true) {
if (!core->pause) {
core->Run(0.5, 0.5);
if(core->render) {
UpdateScreenParallelRdp(*core, core->cpu->mem.mmio.vi);
UpdateScreenParallelRdp(core->cpu->mem.mmio.vi);
}
} else {
if(core->render) {
UpdateScreenParallelRdpNoGame(*core);
UpdateScreenParallelRdpNoGame();
}
}
}