]> git.sesse.net Git - nageru/blobdiff - nageru/audio_mixer.h
When the delay analyzer wants audio from an ALSA card, temporarily auto-enable captur...
[nageru] / nageru / audio_mixer.h
index 2b9aa4b9f77d412dc9a6d93950f4596cfff7ad00..fac2fc92445420901ef084043356670d6a250bf7 100644 (file)
@@ -136,6 +136,9 @@ public:
        MappingMode get_mapping_mode() const;
        InputMapping get_input_mapping() const;
 
+       // See extra_devices.
+       void set_extra_devices(const std::set<DeviceSpec> &devices);
+
        unsigned num_buses() const;
 
        void set_locut_cutoff(float cutoff_hz)
@@ -451,6 +454,13 @@ private:
        std::unique_ptr<BusMetrics[]> bus_metrics;  // One for each bus in <input_mapping>.
 
        DelayAnalyzerInterface *delay_analyzer = nullptr;
+
+       // A set of devices (potentially empty) that should be kept open even
+       // if they're not used in any bus. This allows the delay analyzer to
+       // make sure a given ALSA device is opened to tap into its data, even if
+       // there is no bus using it. (Non-ALSA devices are allowed to be here,
+       // but won't do anything.)
+       std::set<DeviceSpec> extra_devices;
 };
 
 extern AudioMixer *global_audio_mixer;