]> git.sesse.net Git - nageru/blobdiff - nageru/alsa_pool.h
Don't reset an ALSA device when the only thing that changes is which channels to...
[nageru] / nageru / alsa_pool.h
index 904e2ecf971f9850744b5e5a723e00aae073c399..d42101971ccd41d6cd15bdf7e99689bea2283633 100644 (file)
@@ -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<Device> 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<Device> 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.