diff --git a/audio/drivers/xaudio.cpp b/audio/drivers/xaudio.cpp index e8c715c891..64e81cc086 100644 --- a/audio/drivers/xaudio.cpp +++ b/audio/drivers/xaudio.cpp @@ -59,7 +59,7 @@ struct xaudio2 : public IXAudio2VoiceCallback STDMETHOD_(void, OnBufferStart) (void *) {} STDMETHOD_(void, OnBufferEnd) (void *) { - InterlockedDecrement(&buffers); + InterlockedDecrement((LONG volatile*)&buffers); SetEvent(hEvent); } STDMETHOD_(void, OnLoopEnd) (void *) {} @@ -219,7 +219,7 @@ static size_t xaudio2_write(xaudio2_t *handle, const void *buf, size_t bytes_) if (FAILED(handle->pSourceVoice->SubmitSourceBuffer(&xa2buffer, NULL))) return 0; - InterlockedIncrement(&handle->buffers); + InterlockedIncrement((LONG volatile*)&handle->buffers); handle->bufptr = 0; handle->write_buffer = (handle->write_buffer + 1) & MAX_BUFFERS_MASK; } diff --git a/audio/drivers/xaudio.h b/audio/drivers/xaudio.h index b2f2cb74cc..af2af0012c 100644 --- a/audio/drivers/xaudio.h +++ b/audio/drivers/xaudio.h @@ -27,6 +27,7 @@ #define X2DEFAULT(x) = (x) #ifdef _XBOX +#include #define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ DEFINE_GUID(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)