+ CFIndex count = 0;
+ if (p_sys->device_list)
+ count = CFArrayGetCount(p_sys->device_list);
+
+ if (count > 0) {
+ CFShow(currentListOfDevices);
+ CFShow(p_sys->device_list);
+ CFNumberRef cfn_device_id;
+ int i_device_id = 0;
+ for (CFIndex x = 0; x < count; x++) {
+ if (!CFArrayContainsValue(currentListOfDevices, CFRangeMake(0, count), CFArrayGetValueAtIndex(p_sys->device_list, x))) {
+ cfn_device_id = CFArrayGetValueAtIndex(p_sys->device_list, x);
+
+ if (cfn_device_id) {
+ CFNumberGetValue(cfn_device_id, kCFNumberSInt32Type, &i_device_id);
+ ReportDevice(p_aout, i_device_id, NULL);
+ }
+ }
+ }
+ }
+ CFRelease(p_sys->device_list);
+ p_sys->device_list = CFArrayCreateCopy(kCFAllocatorDefault, currentListOfDevices);
+ CFRelease(currentListOfDevices);
+