mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
AudioCommon: Get initial sample rates from AudioInterface
This commit is contained in:
parent
1a1b89e7e8
commit
bd44106fec
4 changed files with 17 additions and 3 deletions
|
@ -15,6 +15,7 @@
|
|||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/HW/AudioInterface.h"
|
||||
|
||||
// This shouldn't be a global, at least not here.
|
||||
std::unique_ptr<SoundStream> g_sound_stream;
|
||||
|
@ -67,6 +68,12 @@ void InitSoundStream()
|
|||
g_sound_stream->Init();
|
||||
}
|
||||
|
||||
// Ideally these two calls would be done in AudioInterface::Init so that we don't
|
||||
// need to have a dependency on AudioInterface here, but this has to be done
|
||||
// after creating g_sound_stream (above) and before starting audio dumping (below)
|
||||
g_sound_stream->GetMixer()->SetDMAInputSampleRate(AudioInterface::GetAIDSampleRate());
|
||||
g_sound_stream->GetMixer()->SetStreamInputSampleRate(AudioInterface::GetAISSampleRate());
|
||||
|
||||
UpdateSoundStream();
|
||||
SetSoundStreamRunning(true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue