From 6542ce76d0740ccd505fd9326a7a4b2d737af663 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 13 Jul 2013 16:57:04 -0400 Subject: Don't use trylock in assertions on windows as it will fail glib uses TryEnterCriticalSection on windows which will return true if the lock as able to be locked *or* is already locked by the current thread. --- libs/ardour/io.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/ardour/io.cc') diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index cdb8a4693c..4e080b06d8 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -395,7 +395,9 @@ IO::disconnect (void* src) int IO::ensure_ports_locked (ChanCount count, bool clear, bool& changed) { +#ifndef WIN32 assert (!AudioEngine::instance()->process_lock().trylock()); +#endif boost::shared_ptr port; @@ -466,7 +468,9 @@ IO::ensure_ports_locked (ChanCount count, bool clear, bool& changed) int IO::ensure_ports (ChanCount count, bool clear, void* src) { +#ifndef WIN32 assert (!AudioEngine::instance()->process_lock().trylock()); +#endif bool changed = false; @@ -501,7 +505,9 @@ IO::ensure_ports (ChanCount count, bool clear, void* src) int IO::ensure_io (ChanCount count, bool clear, void* src) { +#ifndef WIN32 assert (!AudioEngine::instance()->process_lock().trylock()); +#endif return ensure_ports (count, clear, src); } -- cgit v1.2.3