mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
API CHANGE: Remove the pContext parameter from device enum callback.
This is part of some future work to decouple `ma_context` and `ma_device` from backends. If you need access to the context for some reason, you can pass it in via the user data.
This commit is contained in:
@@ -165,7 +165,7 @@ static ma_result ma_context_enumerate_devices__sdl(void* pUserData, ma_context*
|
||||
deviceInfo.isDefault = MA_TRUE;
|
||||
}
|
||||
|
||||
cbResult = callback(pContext, ma_device_type_playback, &deviceInfo, pCallbackUserData);
|
||||
cbResult = callback(ma_device_type_playback, &deviceInfo, pCallbackUserData);
|
||||
if (cbResult == MA_FALSE) {
|
||||
isTerminated = MA_TRUE;
|
||||
break;
|
||||
@@ -187,7 +187,7 @@ static ma_result ma_context_enumerate_devices__sdl(void* pUserData, ma_context*
|
||||
deviceInfo.isDefault = MA_TRUE;
|
||||
}
|
||||
|
||||
cbResult = callback(pContext, ma_device_type_capture, &deviceInfo, pCallbackUserData);
|
||||
cbResult = callback(ma_device_type_capture, &deviceInfo, pCallbackUserData);
|
||||
if (cbResult == MA_FALSE) {
|
||||
isTerminated = MA_TRUE;
|
||||
break;
|
||||
@@ -616,7 +616,16 @@ static ma_device_backend_vtable ma_gDeviceBackendVTable_SDL =
|
||||
NULL, /* onDeviceWrite */
|
||||
NULL, /* onDeviceDataLoop */
|
||||
NULL, /* onDeviceDataLoopWakeup */
|
||||
NULL /* onDeviceGetInfo */
|
||||
NULL, /* onDeviceGetInfo */
|
||||
|
||||
/* Temp. */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
const ma_device_backend_vtable* MA_DEVICE_BACKEND_VTABLE_SDL = &ma_gDeviceBackendVTable_SDL;
|
||||
|
||||
Reference in New Issue
Block a user