diff options
author | Arisotura <thetotalworm@gmail.com> | 2023-11-04 14:20:58 +0100 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2023-11-04 14:20:58 +0100 |
commit | 76976fef3038918ad01a9dbda4c0e5d9bebef9af (patch) | |
tree | bf9a8b62f760a1f4f945599032bcef4d8fd7bd57 /src/frontend | |
parent | ac38faef1409553c016a2a8c9a8cf74f2e5e0249 (diff) |
convert SPU to OOP
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/qt_sdl/AudioInOut.cpp | 7 | ||||
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/frontend/qt_sdl/AudioInOut.cpp b/src/frontend/qt_sdl/AudioInOut.cpp index 120ff5f..7faac9f 100644 --- a/src/frontend/qt_sdl/AudioInOut.cpp +++ b/src/frontend/qt_sdl/AudioInOut.cpp @@ -22,6 +22,7 @@ #include "FrontendUtil.h" #include "Config.h" +#include "NDS.h" #include "SPU.h" #include "Platform.h" #include "Input.h" @@ -54,7 +55,7 @@ void AudioCallback(void* data, Uint8* stream, int len) int num_in; SDL_LockMutex(audioSyncLock); - num_in = SPU::ReadOutput(buf_in, len_in); + num_in = NDS::SPU->ReadOutput(buf_in, len_in); SDL_CondSignal(audioSync); SDL_UnlockMutex(audioSyncLock); @@ -352,7 +353,7 @@ void AudioSync() if (audioDevice) { SDL_LockMutex(audioSyncLock); - while (SPU::GetOutputSize() > 1024) + while (NDS::SPU->GetOutputSize() > 1024) { int ret = SDL_CondWaitTimeout(audioSync, audioSyncLock, 500); if (ret == SDL_MUTEX_TIMEDOUT) break; @@ -365,7 +366,7 @@ void UpdateSettings() { MicClose(); - SPU::SetInterpolation(Config::AudioInterp); + NDS::SPU->SetInterpolation(Config::AudioInterp); SetupMicInputData(); MicOpen(); diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index dcd52bd..700caea 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -342,7 +342,7 @@ void EmuThread::run() GPU::InitRenderer(videoRenderer); GPU::SetRenderSettings(videoRenderer, videoSettings); - SPU::SetInterpolation(Config::AudioInterp); + NDS::SPU->SetInterpolation(Config::AudioInterp); Input::Init(); @@ -2942,12 +2942,12 @@ void MainWindow::onPathSettingsFinished(int res) void MainWindow::onUpdateAudioSettings() { - SPU::SetInterpolation(Config::AudioInterp); + NDS::SPU->SetInterpolation(Config::AudioInterp); if (Config::AudioBitDepth == 0) - SPU::SetDegrade10Bit(NDS::ConsoleType == 0); + NDS::SPU->SetDegrade10Bit(NDS::ConsoleType == 0); else - SPU::SetDegrade10Bit(Config::AudioBitDepth == 1); + NDS::SPU->SetDegrade10Bit(Config::AudioBitDepth == 1); } void MainWindow::onAudioSettingsFinished(int res) |