mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Fix some VC6/2003 errors
For whatever reason, neither compiler likes implicit casts between `volatile unsigned int*` and `int*`.
This commit is contained in:
+4
-4
@@ -10409,7 +10409,7 @@ static ma_thread_result MA_THREADCALL ma_device_thread__null(void* pData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Getting here means a suspend or kill operation has been requested. */
|
/* Getting here means a suspend or kill operation has been requested. */
|
||||||
c89atomic_exchange_32(&pDevice->null_device.operationResult, MA_SUCCESS);
|
c89atomic_exchange_32((c89atomic_uint32*)&pDevice->null_device.operationResult, MA_SUCCESS);
|
||||||
ma_event_signal(&pDevice->null_device.operationCompletionEvent);
|
ma_event_signal(&pDevice->null_device.operationCompletionEvent);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -10423,7 +10423,7 @@ static ma_thread_result MA_THREADCALL ma_device_thread__null(void* pData)
|
|||||||
ma_timer_init(&pDevice->null_device.timer);
|
ma_timer_init(&pDevice->null_device.timer);
|
||||||
|
|
||||||
/* We're done. */
|
/* We're done. */
|
||||||
c89atomic_exchange_32(&pDevice->null_device.operationResult, MA_SUCCESS);
|
c89atomic_exchange_32((c89atomic_uint32*)&pDevice->null_device.operationResult, MA_SUCCESS);
|
||||||
ma_event_signal(&pDevice->null_device.operationCompletionEvent);
|
ma_event_signal(&pDevice->null_device.operationCompletionEvent);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -10431,7 +10431,7 @@ static ma_thread_result MA_THREADCALL ma_device_thread__null(void* pData)
|
|||||||
/* Killing the device means we need to get out of this loop so that this thread can terminate. */
|
/* Killing the device means we need to get out of this loop so that this thread can terminate. */
|
||||||
if (pDevice->null_device.operation == MA_DEVICE_OP_KILL__NULL) {
|
if (pDevice->null_device.operation == MA_DEVICE_OP_KILL__NULL) {
|
||||||
c89atomic_exchange_32(&pDevice->null_device.operation, MA_DEVICE_OP_NONE__NULL);
|
c89atomic_exchange_32(&pDevice->null_device.operation, MA_DEVICE_OP_NONE__NULL);
|
||||||
c89atomic_exchange_32(&pDevice->null_device.operationResult, MA_SUCCESS);
|
c89atomic_exchange_32((c89atomic_uint32*)&pDevice->null_device.operationResult, MA_SUCCESS);
|
||||||
ma_event_signal(&pDevice->null_device.operationCompletionEvent);
|
ma_event_signal(&pDevice->null_device.operationCompletionEvent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -10439,7 +10439,7 @@ static ma_thread_result MA_THREADCALL ma_device_thread__null(void* pData)
|
|||||||
/* Getting a signal on a "none" operation probably means an error. Return invalid operation. */
|
/* Getting a signal on a "none" operation probably means an error. Return invalid operation. */
|
||||||
if (pDevice->null_device.operation == MA_DEVICE_OP_NONE__NULL) {
|
if (pDevice->null_device.operation == MA_DEVICE_OP_NONE__NULL) {
|
||||||
MA_ASSERT(MA_FALSE); /* <-- Trigger this in debug mode to ensure developers are aware they're doing something wrong (or there's a bug in a miniaudio). */
|
MA_ASSERT(MA_FALSE); /* <-- Trigger this in debug mode to ensure developers are aware they're doing something wrong (or there's a bug in a miniaudio). */
|
||||||
c89atomic_exchange_32(&pDevice->null_device.operationResult, (c89atomic_uint32)MA_INVALID_OPERATION);
|
c89atomic_exchange_32((c89atomic_uint32*)&pDevice->null_device.operationResult, (c89atomic_uint32)MA_INVALID_OPERATION);
|
||||||
ma_event_signal(&pDevice->null_device.operationCompletionEvent);
|
ma_event_signal(&pDevice->null_device.operationCompletionEvent);
|
||||||
continue; /* Continue the loop. Don't terminate. */
|
continue; /* Continue the loop. Don't terminate. */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user