mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
Fix C++ build.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user