X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=audio_mixer.h;h=faa0cc52b025b23e6fe541e993e6ee1e085427a0;hb=61116d03f84a53e96445c2b5d8686f2ea7e7c855;hp=7ae5464d44ab61fe336e28603460f693cc9a33ea;hpb=a564f192f808841ad8dfa9a4aa6c8db3335bd6fd;p=nageru diff --git a/audio_mixer.h b/audio_mixer.h index 7ae5464..faa0cc5 100644 --- a/audio_mixer.h +++ b/audio_mixer.h @@ -63,6 +63,7 @@ public: std::vector 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;