Ensure stdcall on XAudio2 callback

Fix for x86 build
This commit is contained in:
wangqr 2020-03-29 22:18:49 -04:00
parent 4b096e6c6e
commit 62708e8e5c
1 changed files with 7 additions and 7 deletions

View File

@ -218,17 +218,17 @@ public:
~XAudio2Thread(); ~XAudio2Thread();
// IXAudio2VoiceCallback // IXAudio2VoiceCallback
void OnVoiceProcessingPassStart(UINT32 BytesRequired) {} void STDMETHODCALLTYPE OnVoiceProcessingPassStart(UINT32 BytesRequired) override {}
void OnVoiceProcessingPassEnd() {} void STDMETHODCALLTYPE OnVoiceProcessingPassEnd() override {}
void OnStreamEnd() {} void STDMETHODCALLTYPE OnStreamEnd() override {}
void OnBufferStart(void* pBufferContext) {} void STDMETHODCALLTYPE OnBufferStart(void* pBufferContext) override {}
void OnBufferEnd(void* pBufferContext) { void STDMETHODCALLTYPE OnBufferEnd(void* pBufferContext) override {
intptr_t i = reinterpret_cast<intptr_t>(pBufferContext); intptr_t i = reinterpret_cast<intptr_t>(pBufferContext);
buffer_occupied[i] = false; buffer_occupied[i] = false;
SetEvent(event_buffer_end); SetEvent(event_buffer_end);
} }
void OnLoopEnd(void* pBufferContext) {} void STDMETHODCALLTYPE OnLoopEnd(void* pBufferContext) override {}
void OnVoiceError(void* pBufferContext, HRESULT Error) {} void STDMETHODCALLTYPE OnVoiceError(void* pBufferContext, HRESULT Error) override {}
/// @brief Start audio playback /// @brief Start audio playback
/// @param start Audio frame to start playback at /// @param start Audio frame to start playback at