Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xaudio2: enable IXAudio2Extension for mingw-w64 #14514

Merged
merged 2 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions rpcs3/Emu/Audio/XAudio2/XAudio2Backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,9 @@ f64 XAudio2Backend::GetCallbackFrameLen()
return _10ms;
}

#if _MSC_VER
Microsoft::WRL::ComPtr<IXAudio2Extension> xaudio_ext{};
#endif
f64 min_latency{};

#if _MSC_VER
if (HRESULT hr = m_xaudio2_instance->QueryInterface(IID_IXAudio2Extension, std::bit_cast<void**>(xaudio_ext.GetAddressOf())); FAILED(hr))
{
XAudio.error("QueryInterface() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
Expand All @@ -337,7 +334,6 @@ f64 XAudio2Backend::GetCallbackFrameLen()
min_latency = static_cast<f64>(samples_per_q) / freq;
}
}
#endif

return std::max<f64>(min_latency, _10ms); // 10ms is the minimum for XAudio
}
Expand Down
1 change: 1 addition & 0 deletions rpcs3/Emu/Audio/XAudio2/XAudio2Backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#ifdef _MSC_VER
#include <xaudio2redist.h>
#else
#include <initguid.h>
#include <xaudio2.h>
#endif
#include <wrl/client.h>
Expand Down