diff options
Diffstat (limited to 'test/common.h')
-rw-r--r-- | test/common.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/common.h b/test/common.h index 6643b7c..9e5a002 100644 --- a/test/common.h +++ b/test/common.h @@ -70,7 +70,7 @@ layout_info const layout_infos[CUBEB_LAYOUT_MAX] = { int has_available_input_device(cubeb * ctx) { - cubeb_device_collection * devices; + cubeb_device_collection devices; int input_device_available = 0; int r; /* Bail out early if the host does not have input devices. */ @@ -80,14 +80,14 @@ int has_available_input_device(cubeb * ctx) return 0; } - if (devices->count == 0) { + if (devices.count == 0) { fprintf(stderr, "no input device available, skipping test.\n"); - cubeb_device_collection_destroy(ctx, devices); + cubeb_device_collection_destroy(ctx, &devices); return 0; } - for (uint32_t i = 0; i < devices->count; i++) { - input_device_available |= (devices->device[i]->state == + for (uint32_t i = 0; i < devices.count; i++) { + input_device_available |= (devices.device[i].state == CUBEB_DEVICE_STATE_ENABLED); } @@ -96,7 +96,7 @@ int has_available_input_device(cubeb * ctx) "available, skipping\n"); } - cubeb_device_collection_destroy(ctx, devices); + cubeb_device_collection_destroy(ctx, &devices); return !!input_device_available; } |