mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
XAudio: fix deinitialization order
This commit is contained in:
parent
107107107c
commit
681bab558b
1 changed files with 6 additions and 6 deletions
|
@ -103,12 +103,6 @@ void XAudio2Backend::Play()
|
|||
|
||||
void XAudio2Backend::CloseUnlocked()
|
||||
{
|
||||
if (m_master_voice != nullptr)
|
||||
{
|
||||
m_master_voice->DestroyVoice();
|
||||
m_master_voice = nullptr;
|
||||
}
|
||||
|
||||
if (m_source_voice != nullptr)
|
||||
{
|
||||
const HRESULT hr = m_source_voice->Stop();
|
||||
|
@ -121,6 +115,12 @@ void XAudio2Backend::CloseUnlocked()
|
|||
m_source_voice = nullptr;
|
||||
}
|
||||
|
||||
if (m_master_voice != nullptr)
|
||||
{
|
||||
m_master_voice->DestroyVoice();
|
||||
m_master_voice = nullptr;
|
||||
}
|
||||
|
||||
m_playing = false;
|
||||
m_data_buf = nullptr;
|
||||
m_data_buf_len = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue