Fix C++ build.

This commit is contained in:
David Reid
2017-07-16 21:24:58 +10:00
parent 16eca1827a
commit a2181a5e68
+1 -1
View File
@@ -4082,7 +4082,7 @@ static mal_result mal_device_init__winmm(mal_context* pContext, mal_device_type
pDevice->winmm.fragmentSizeInBytes = pDevice->winmm.fragmentSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat); pDevice->winmm.fragmentSizeInBytes = pDevice->winmm.fragmentSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat);
mal_uint32 heapSize = (sizeof(WAVEHDR) * pDevice->periods) + (pDevice->winmm.fragmentSizeInBytes * pDevice->periods); mal_uint32 heapSize = (sizeof(WAVEHDR) * pDevice->periods) + (pDevice->winmm.fragmentSizeInBytes * pDevice->periods);
pDevice->winmm._pHeapData = mal_malloc(heapSize); pDevice->winmm._pHeapData = (mal_uint8*)mal_malloc(heapSize);
if (pDevice->winmm._pHeapData == NULL) { if (pDevice->winmm._pHeapData == NULL) {
errorMsg = "[WinMM] Failed to allocate memory for the intermediary buffer.", errorCode = MAL_OUT_OF_MEMORY; errorMsg = "[WinMM] Failed to allocate memory for the intermediary buffer.", errorCode = MAL_OUT_OF_MEMORY;
goto on_error; goto on_error;