mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-07 08:39:00 +00:00
SoundStream: change Start/Stop to Init/SetRunning/destruct
This commit is contained in:
parent
ad4a89d64b
commit
0baddbf9a8
18 changed files with 102 additions and 121 deletions
|
@ -169,7 +169,7 @@ XAudio2::~XAudio2()
|
|||
CoUninitialize();
|
||||
}
|
||||
|
||||
bool XAudio2::Start()
|
||||
bool XAudio2::Init()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -210,15 +210,17 @@ void XAudio2::SetVolume(int volume)
|
|||
m_mastering_voice->SetVolume(m_volume);
|
||||
}
|
||||
|
||||
void XAudio2::SetRunning(bool running)
|
||||
bool XAudio2::SetRunning(bool running)
|
||||
{
|
||||
if (m_voice_context)
|
||||
{
|
||||
if (running)
|
||||
m_voice_context->Play();
|
||||
else
|
||||
m_voice_context->Stop();
|
||||
}
|
||||
if (!m_voice_context)
|
||||
return false;
|
||||
|
||||
if (running)
|
||||
m_voice_context->Play();
|
||||
else
|
||||
m_voice_context->Stop();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void XAudio2::Stop()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue