// EMPTY or DEAD state. Only for ALSAInput and for internal use.
void free_card(unsigned index);
- // TODO: Add accessors and/or callbacks about changed state, so that
- // the UI actually stands a chance in using that information.
-
private:
mutable std::mutex mu;
std::vector<Device> devices; // Under mu.
};
ProbeResult probe_device_once(unsigned card_index, unsigned dev_index);
+ void unplug_device(unsigned card_index, unsigned dev_index);
+
// Must be called with <mu> held. Will allocate a new entry if needed.
// The returned entry will be set to READY state.
- unsigned find_free_device_index();
+ unsigned find_free_device_index(const std::string &name,
+ const std::string &info,
+ unsigned num_channels,
+ const std::string &address);
friend class ALSAInput;
};