]> git.sesse.net Git - nageru/blobdiff - alsa_input.h
Add some ALSA device enumeration code.
[nageru] / alsa_input.h
index 724b64011749f01bc554cb720e3c095473113c3c..d485a3b74e18b1ce823c5dbf9d5ea7df08ad1ce2 100644 (file)
@@ -34,6 +34,14 @@ public:
        void start_capture_thread();
        void stop_capture_thread();
 
+       // TODO: Worry about hotplug.
+       struct Device {
+               std::string address;  // E.g. “hw:0,0”.
+               std::string name, info;
+               unsigned num_channels;
+       };
+       static std::vector<Device> enumerate_devices();
+
 private:
        void capture_thread_func();
        int64_t frames_to_pts(uint64_t n) const;