mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
CoreAudio/MIDI: add locks for port-registration
CoreMIDI ports are dynamic. When dis/connecting a device CoreAudio's AudioHardware-PropertyListener triggers a callback which can add/remove ports. This can not happen concurrently with processing, but it may happen concurrently with a user creating tracks using Ardour's UI and/or session-load/setup.
This commit is contained in:
parent
5132a6c2eb
commit
37df98d0af
2 changed files with 9 additions and 0 deletions
|
|
@ -485,6 +485,7 @@ class CoreAudioBackend : public AudioBackend {
|
|||
|
||||
std::vector<PortConnectData *> _port_connection_queue;
|
||||
pthread_mutex_t _port_callback_mutex;
|
||||
pthread_mutex_t _port_registration_mutex;
|
||||
bool _port_change_flag;
|
||||
|
||||
void port_connect_callback (const std::string& a, const std::string& b, bool conn) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue