diff options
author | Robin Gareus <robin@gareus.org> | 2015-12-09 11:12:56 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-12-09 11:13:18 +0100 |
commit | 8bfa7d95c1dd0ba7707095674ab97fa56a960776 (patch) | |
tree | 7cf93e40ab78b99a6f65a0b8a36e89c3f91a6f3b /libs/ardour/audioengine.cc | |
parent | 548989fc75ba08912efe2bc48d24af5eb95c790d (diff) |
fix/workaround OSX "No Memory Pool"
fixes issue on MacBookPro11,1 OSX 10.10
* Coreaudio: internal speaker + internal Mic
* start recording
* plug-in headphone
* stop recording
-> crash
process_callback -> [..] stop_transport -> no RT memory pool
for realtime event.
Diffstat (limited to 'libs/ardour/audioengine.cc')
-rw-r--r-- | libs/ardour/audioengine.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index a87a5ee7d0..84227708ed 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -215,6 +215,26 @@ AudioEngine::process_callback (pframes_t nframes) return 0; } + /* The coreaudio-backend calls thread_init_callback() if + * the hardware changes or pthread_self() changes. + * + * However there are cases when neither holds true, yet + * the thread-pool changes: e.g. connect a headphone to + * a shared mic/headphone jack. + * It's probably related to, or caused by clocksource changes. + * + * For reasons yet unknown Glib::Threads::Private() can + * use a different thread-private in the same pthread + * (coreaudio render callback). + * + * Coreaudio must set something which influences + * pthread_key_t uniqness or reset the key using + * pthread_getspecific(). + */ + if (! SessionEvent::has_per_thread_pool ()) { + thread_init_callback (NULL); + } + bool return_after_remove_check = false; if (_measuring_latency == MeasureAudio && _mtdm) { |