X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bmusb%2Fbmusb.h;fp=bmusb%2Fbmusb.h;h=21cbc408da0f1190db14cd6d45d94ddfab8ace1a;hb=92708386b8ea2a63b99c20e6a5f6beff3d9311ac;hp=506685dc4c6a7401d17143cdb611315981c7b187;hpb=0d48ad939040ec561e67ab2329e3961843b3cf74;p=bmusb diff --git a/bmusb/bmusb.h b/bmusb/bmusb.h index 506685d..21cbc40 100644 --- a/bmusb/bmusb.h +++ b/bmusb/bmusb.h @@ -251,9 +251,11 @@ class BMUSBCapture : public CaptureInterface { // The callback function transfers ownership. If you don't want to hold // on to the device given to you in the callback, you need to call // libusb_unref_device(). - static void set_card_connected_callback(card_connected_callback_t callback) + static void set_card_connected_callback(card_connected_callback_t callback, + bool hotplug_existing_devices_arg = false) { card_connected_callback = callback; + hotplug_existing_devices = hotplug_existing_devices_arg; } // Similar to set_card_connected_callback(), with the same caveats. @@ -299,6 +301,7 @@ class BMUSBCapture : public CaptureInterface { std::unique_ptr owned_audio_frame_allocator; frame_callback_t frame_callback = nullptr; static card_connected_callback_t card_connected_callback; + static bool hotplug_existing_devices; card_disconnected_callback_t card_disconnected_callback = nullptr; std::thread dequeue_thread;