AudioCommon: Move sound stream variables to Core::System.

This commit is contained in:
Admiral H. Curtiss
2022-08-31 21:44:21 +02:00
parent 9195e1a9b8
commit c310e504cb
10 changed files with 139 additions and 51 deletions

View File

@ -26,6 +26,7 @@
#include "Core/HW/SI/SI_Device.h"
#include "Core/Movie.h"
#include "Core/NetPlayProto.h"
#include "Core/System.h"
#include "DolphinQt/QtUtils/DolphinFileDialog.h"
#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/Resources.h"
@ -325,7 +326,8 @@ void GBAWidget::UpdateTitle()
void GBAWidget::UpdateVolume()
{
int volume = m_muted ? 0 : m_volume * 256 / 100;
g_sound_stream->GetMixer()->SetGBAVolume(m_core_info.device_number, volume, volume);
auto& system = Core::System::GetInstance();
system.GetSoundStream()->GetMixer()->SetGBAVolume(m_core_info.device_number, volume, volume);
UpdateTitle();
}