mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Add ma_device_id_equal().
This commit is contained in:
+20
@@ -7020,6 +7020,8 @@ typedef union
|
|||||||
int nullbackend; /* The null backend uses an integer for device IDs. */
|
int nullbackend; /* The null backend uses an integer for device IDs. */
|
||||||
} ma_device_id;
|
} ma_device_id;
|
||||||
|
|
||||||
|
MA_API ma_bool32 ma_device_id_equal(const ma_device_id* pA, const ma_device_id* pB);
|
||||||
|
|
||||||
|
|
||||||
typedef struct ma_context_config ma_context_config;
|
typedef struct ma_context_config ma_context_config;
|
||||||
typedef struct ma_device_config ma_device_config;
|
typedef struct ma_device_config ma_device_config;
|
||||||
@@ -41416,6 +41418,24 @@ MA_API ma_result ma_device_job_thread_next(ma_device_job_thread* pJobThread, ma_
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MA_API ma_bool32 ma_device_id_equal(const ma_device_id* pA, const ma_device_id* pB)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
if (pA == NULL || pB == NULL) {
|
||||||
|
return MA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < sizeof(ma_device_id); i += 1) {
|
||||||
|
if (((const char*)pA)[i] != ((const char*)pB)[i]) {
|
||||||
|
return MA_FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return MA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MA_API ma_context_config ma_context_config_init(void)
|
MA_API ma_context_config ma_context_config_init(void)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user