X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Falsa_pool.h;h=d42101971ccd41d6cd15bdf7e99689bea2283633;hb=9768e380472e6ad68c8fc06efde3fa20f18bfc00;hp=904e2ecf971f9850744b5e5a723e00aae073c399;hpb=9b7d691b4cc5db7dbfc18c82e86c1207fcac4722;p=nageru diff --git a/nageru/alsa_pool.h b/nageru/alsa_pool.h index 904e2ec..d421019 100644 --- a/nageru/alsa_pool.h +++ b/nageru/alsa_pool.h @@ -70,15 +70,17 @@ public: void init(); - // Get the list of all current devices. Note that this will implicitly mark - // all of the returned devices as held, since the input mapping UI needs - // some kind of stability when the user is to choose. Thus, when you are done - // with the list and have set a new mapping, you must go through all the devices - // you don't want and release them using release_device(). - std::vector get_devices(); + // Get the list of all current devices. Note that if hold_devices==true, + // all of the returned devices will be marked as held (used by the input mapping UI, + // which needs some kind of stability when the user is to choose). + // Thus, when you are done with the list and have set a new mapping, + // you must go through all the devices you don't want and release them + // using release_device(). + std::vector get_devices(bool hold_devices); void hold_device(unsigned index); void release_device(unsigned index); // Note: index is allowed to go out of bounds. + bool device_is_held(unsigned index); // Same here. // If device is held, start or restart capture. If device is not held, // stop capture if it isn't already.