]> git.sesse.net Git - nageru/commitdiff
Make sure AudioDevice::name is set for ALSA cards, not just video capture cards.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 11 Sep 2016 23:09:04 +0000 (01:09 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 19 Oct 2016 22:55:44 +0000 (00:55 +0200)
alsa_input.cpp
audio_mixer.cpp

index 09cbbd2bc66526fb6be6544ac431774ec444968f..7594bbbd463b08ef7525c5859b500a7cab3b531e 100644 (file)
@@ -467,9 +467,10 @@ ALSAPool::ProbeResult ALSAPool::probe_device_once(unsigned card_index, unsigned
        fprintf(stderr, "%s: Probed successfully.\n", address);
 
        reset_device(internal_dev_index);  // Restarts it if it is held (ie., we just replaced a dead card).
-       if (global_audio_mixer) {
-               global_audio_mixer->trigger_state_changed_callback();
-       }
+
+       DeviceSpec spec{InputSourceType::ALSA_INPUT, internal_dev_index};
+       global_audio_mixer->set_name(spec, name + " (" + info + ")");
+       global_audio_mixer->trigger_state_changed_callback();
 
        return ALSAPool::ProbeResult::SUCCESS;
 }
index a2f25f0a2d93fb5a8c29dae5548ed33cee723302..cf2c9441203f00f672c0e8ed1be90467fdb603e0 100644 (file)
@@ -162,6 +162,8 @@ AudioMixer::AudioMixer(unsigned num_cards)
          limiter(OUTPUT_FREQUENCY),
          correlation(OUTPUT_FREQUENCY)
 {
+       global_audio_mixer = this;
+
        for (unsigned bus_index = 0; bus_index < MAX_BUSES; ++bus_index) {
                locut[bus_index].init(FILTER_HPF, 2);
                locut_enabled[bus_index] = global_flags.locut_enabled;