diff options
Diffstat (limited to 'audio/out/ao_wasapi_utils.c')
-rw-r--r-- | audio/out/ao_wasapi_utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index 2768104cb4..6d2a707aac 100644 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -749,7 +749,7 @@ struct enumerator { struct mp_log *log; IMMDeviceEnumerator *pEnumerator; IMMDeviceCollection *pDevices; - int count; + UINT count; }; static void destroy_enumerator(struct enumerator *e) @@ -784,7 +784,7 @@ exit_label: return NULL; } -static struct device_desc *device_desc_for_num(struct enumerator *e, int i) +static struct device_desc *device_desc_for_num(struct enumerator *e, UINT i) { IMMDevice *pDevice = NULL; HRESULT hr = IMMDeviceCollection_Item(e->pDevices, i, &pDevice); @@ -818,7 +818,7 @@ void wasapi_list_devs(struct ao *ao, struct ao_device_list *list) if (!enumerator) return; - for (int i = 0; i < enumerator->count; i++) { + for (UINT i = 0; i < enumerator->count; i++) { struct device_desc *d = device_desc_for_num(enumerator, i); if (!d) goto exit_label; @@ -888,7 +888,7 @@ LPWSTR find_deviceID(struct ao *ao) // try selecting by number bstr rest; long long devno = bstrtoll(device, &rest, 10); - if (!rest.len && 0 <= devno && devno < enumerator->count) { + if (!rest.len && 0 <= devno && devno < (long long)enumerator->count) { MP_VERBOSE(ao, "Selecting device by number: #%lld\n", devno); d = device_desc_for_num(enumerator, devno); deviceID = select_device(ao->log, d); @@ -897,7 +897,7 @@ LPWSTR find_deviceID(struct ao *ao) // select by id or name bstr_eatstart0(&device, "{0.0.0.00000000}."); - for (int i = 0; i < enumerator->count; i++) { + for (UINT i = 0; i < enumerator->count; i++) { d = device_desc_for_num(enumerator, i); if (!d) goto exit_label; |