From 1e996ca45f68b4d2475c528d76fb4ea1c04a1949 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 10 Apr 2020 10:01:04 -0600 Subject: [PATCH] add port connect/add/remove callbacks to CoreAudio backend --- libs/backends/coreaudio/coreaudio_backend.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libs/backends/coreaudio/coreaudio_backend.cc b/libs/backends/coreaudio/coreaudio_backend.cc index 2c4e03e116..ab38ad9517 100644 --- a/libs/backends/coreaudio/coreaudio_backend.cc +++ b/libs/backends/coreaudio/coreaudio_backend.cc @@ -1610,12 +1610,19 @@ CoreAudioPort::CoreAudioPort (CoreAudioBackend &b, const std::string& name, Port : BackendPort (b, name, flags) { memset (_buffer, 0, sizeof (_buffer)); - mlock(_buffer, sizeof (_buffer)); + mlock (_buffer, sizeof (_buffer)); + + _backend.port_connect_add_remove_callback (); // XXX -> RT + } -CoreAudioPort::~CoreAudioPort () { } +CoreAudioPort::~CoreAudioPort () +{ + _backend.port_connect_add_remove_callback (); // XXX -> RT +} -void* CoreAudioPort::get_buffer (pframes_t n_samples) +void* +CoreAudioPort::get_buffer (pframes_t n_samples) { if (is_input ()) { const std::set& connections = get_connections ();