mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Add ma_device_get_user_data().
This commit is contained in:
+14
@@ -8802,6 +8802,11 @@ Retrieves a pointer to the context that owns the given device.
|
||||
*/
|
||||
MA_API ma_context* ma_device_get_context(ma_device* pDevice);
|
||||
|
||||
/*
|
||||
Retrieves the user data pointer of the given device.
|
||||
*/
|
||||
MA_API void* ma_device_get_user_data(ma_device* pDevice);
|
||||
|
||||
/*
|
||||
Helper function for retrieving the log object associated with the context that owns this device.
|
||||
*/
|
||||
@@ -45453,6 +45458,15 @@ MA_API ma_context* ma_device_get_context(ma_device* pDevice)
|
||||
return pDevice->pContext;
|
||||
}
|
||||
|
||||
MA_API void* ma_device_get_user_data(ma_device* pDevice)
|
||||
{
|
||||
if (pDevice == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return pDevice->pUserData;
|
||||
}
|
||||
|
||||
MA_API ma_log* ma_device_get_log(ma_device* pDevice)
|
||||
{
|
||||
return ma_context_get_log(ma_device_get_context(pDevice));
|
||||
|
||||
Reference in New Issue
Block a user