diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-13 16:57:04 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-13 16:57:04 -0400 |
commit | 6542ce76d0740ccd505fd9326a7a4b2d737af663 (patch) | |
tree | 7b1540156346a3d67ae242da4ef033dae3f7c377 /libs/ardour/io.cc | |
parent | 1fd2412f5be9a96e5015f81d5c89d88ce730f9c1 (diff) |
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.
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r-- | libs/ardour/io.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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> 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); } |