mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 12:48:57 +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
|
@ -157,7 +157,7 @@ XAudio2_7::~XAudio2_7()
|
|||
CoUninitialize();
|
||||
}
|
||||
|
||||
bool XAudio2_7::Start()
|
||||
bool XAudio2_7::Init()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -198,15 +198,17 @@ void XAudio2_7::SetVolume(int volume)
|
|||
m_mastering_voice->SetVolume(m_volume);
|
||||
}
|
||||
|
||||
void XAudio2_7::SetRunning(bool running)
|
||||
bool XAudio2_7::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_7::Stop()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue