mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
Merge pull request #576 from bradhugh/xaudio2
XAudio2 Bug fix - forgot to initialize buffers and no need to init COM
This commit is contained in:
commit
41462ec437
@ -306,8 +306,6 @@ int sound_xaudio2::init(osd_options const &options)
|
|||||||
{
|
{
|
||||||
HRESULT result = S_OK;
|
HRESULT result = S_OK;
|
||||||
|
|
||||||
HR_IGNORE(CoInitializeEx(NULL, COINITBASE_MULTITHREADED));
|
|
||||||
|
|
||||||
// Create the IXAudio2 object
|
// Create the IXAudio2 object
|
||||||
IXAudio2 *temp_xaudio2 = nullptr;
|
IXAudio2 *temp_xaudio2 = nullptr;
|
||||||
HR_RET1(xaudio2_create(&temp_xaudio2));
|
HR_RET1(xaudio2_create(&temp_xaudio2));
|
||||||
@ -331,6 +329,9 @@ int sound_xaudio2::init(osd_options const &options)
|
|||||||
m_xAudio2->SetDebugConfiguration(&debugConfig);
|
m_xAudio2->SetDebugConfiguration(&debugConfig);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Create the buffers
|
||||||
|
create_buffers(format);
|
||||||
|
|
||||||
// Initialize our events
|
// Initialize our events
|
||||||
m_hEventBufferCompleted = CreateEvent(NULL, FALSE, FALSE, NULL);
|
m_hEventBufferCompleted = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
m_hEventDataAvailable = CreateEvent(NULL, FALSE, FALSE, NULL);
|
m_hEventDataAvailable = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user