diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2020-04-10 09:53:44 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2020-04-10 09:53:44 -0600 |
commit | 2a808322438a32d8d81476e15629abf68c6ba2f5 (patch) | |
tree | 3c8c118c6e68c1c3c317fe1f91142eed0742b2cb /libs/backends | |
parent | b943cec756fefab7f840b39c7b9afb86b7388526 (diff) |
add port connect/add/remove callbacks to the ALSA backend
This fixes issues with new ports not (always) appearing in port matrices (and presumably
elsewhere too)
Diffstat (limited to 'libs/backends')
-rw-r--r-- | libs/backends/alsa/alsa_audiobackend.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/backends/alsa/alsa_audiobackend.cc b/libs/backends/alsa/alsa_audiobackend.cc index d8ceb7f796..5d07bc1419 100644 --- a/libs/backends/alsa/alsa_audiobackend.cc +++ b/libs/backends/alsa/alsa_audiobackend.cc @@ -2210,9 +2210,13 @@ AlsaAudioPort::AlsaAudioPort (AlsaAudioBackend &b, const std::string& name, Port { memset (_buffer, 0, sizeof (_buffer)); mlock (_buffer, sizeof (_buffer)); + _backend.port_connect_add_remove_callback (); // XXX -> RT } -AlsaAudioPort::~AlsaAudioPort () { } +AlsaAudioPort::~AlsaAudioPort () +{ + _backend.port_connect_add_remove_callback (); // XXX -> RT +} void* AlsaAudioPort::get_buffer (pframes_t n_samples) @@ -2253,9 +2257,14 @@ AlsaMidiPort::AlsaMidiPort (AlsaAudioBackend &b, const std::string& name, PortFl _buffer[0].reserve(256); _buffer[1].reserve(256); _buffer[2].reserve(256); + + _backend.port_connect_add_remove_callback (); // XXX -> RT } -AlsaMidiPort::~AlsaMidiPort () { } +AlsaMidiPort::~AlsaMidiPort () +{ + _backend.port_connect_add_remove_callback (); // XXX -> RT +} struct MidiEventSorter { bool operator() (AlsaMidiEvent const& a, AlsaMidiEvent const& b) { |