]> git.sesse.net Git - nageru/blobdiff - audio_mixer.h
Actually set the fader positions when making the views for each audio bus.
[nageru] / audio_mixer.h
index 7ae5464d44ab61fe336e28603460f693cc9a33ea..faa0cc52b025b23e6fe541e993e6ee1e085427a0 100644 (file)
@@ -63,6 +63,7 @@ public:
 
        std::vector<float> get_output(double pts, unsigned num_samples, ResamplingQueue::RateAdjustmentPolicy rate_adjustment_policy);
 
+       float get_fader_volume(unsigned bus_index) const { return fader_volume_db[bus_index]; }
        void set_fader_volume(unsigned bus_index, float level_db) { fader_volume_db[bus_index] = level_db; }
 
        // Note: This operation holds all ALSA devices (see ALSAPool::get_devices()).
@@ -76,8 +77,18 @@ public:
                return alsa_pool.get_card_state(index);
        }
 
+       // See comments on ALSAPool::create_dead_card().
+       DeviceSpec create_dead_card(const std::string &name, const std::string &info, unsigned num_channels)
+       {
+               unsigned dead_card_index = alsa_pool.create_dead_card(name, info, num_channels);
+               return DeviceSpec{InputSourceType::ALSA_INPUT, dead_card_index};
+       }
+
        void set_display_name(DeviceSpec device_spec, const std::string &name);
 
+       // Note: The card should be held (currently this isn't enforced, though).
+       void serialize_device(DeviceSpec device_spec, DeviceSpecProto *device_spec_proto);
+
        void set_input_mapping(const InputMapping &input_mapping);
        InputMapping get_input_mapping() const;