mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
Merge branch 'dev' into dev-0.11
This commit is contained in:
+4
-1
@@ -29454,8 +29454,8 @@ static ma_result ma_context__init_device_tracking__coreaudio(ma_context* pContex
|
|||||||
propAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
|
propAddress.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
|
||||||
((ma_AudioObjectAddPropertyListener_proc)pContext->coreaudio.AudioObjectAddPropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL);
|
((ma_AudioObjectAddPropertyListener_proc)pContext->coreaudio.AudioObjectAddPropertyListener)(kAudioObjectSystemObject, &propAddress, &ma_default_device_changed__coreaudio, NULL);
|
||||||
|
|
||||||
g_DeviceTrackingInitCounter_CoreAudio += 1;
|
|
||||||
}
|
}
|
||||||
|
g_DeviceTrackingInitCounter_CoreAudio += 1;
|
||||||
}
|
}
|
||||||
ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio);
|
ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio);
|
||||||
|
|
||||||
@@ -29468,6 +29468,7 @@ static ma_result ma_context__uninit_device_tracking__coreaudio(ma_context* pCont
|
|||||||
|
|
||||||
ma_spinlock_lock(&g_DeviceTrackingInitLock_CoreAudio);
|
ma_spinlock_lock(&g_DeviceTrackingInitLock_CoreAudio);
|
||||||
{
|
{
|
||||||
|
if (g_DeviceTrackingInitCounter_CoreAudio > 0)
|
||||||
g_DeviceTrackingInitCounter_CoreAudio -= 1;
|
g_DeviceTrackingInitCounter_CoreAudio -= 1;
|
||||||
|
|
||||||
if (g_DeviceTrackingInitCounter_CoreAudio == 0) {
|
if (g_DeviceTrackingInitCounter_CoreAudio == 0) {
|
||||||
@@ -29485,6 +29486,8 @@ static ma_result ma_context__uninit_device_tracking__coreaudio(ma_context* pCont
|
|||||||
if (g_ppTrackedDevices_CoreAudio != NULL) {
|
if (g_ppTrackedDevices_CoreAudio != NULL) {
|
||||||
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "You have uninitialized all contexts while an associated device is still active.", MA_INVALID_OPERATION);
|
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_WARNING, "You have uninitialized all contexts while an associated device is still active.", MA_INVALID_OPERATION);
|
||||||
return MA_INVALID_OPERATION;
|
return MA_INVALID_OPERATION;
|
||||||
|
ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio);
|
||||||
|
return MA_INVALID_OPERATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
ma_mutex_uninit(&g_DeviceTrackingMutex_CoreAudio);
|
ma_mutex_uninit(&g_DeviceTrackingMutex_CoreAudio);
|
||||||
|
|||||||
Reference in New Issue
Block a user