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.
This commit is contained in:
parent
1fd2412f5b
commit
6542ce76d0
@ -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);
|
||||
}
|
||||
|
@ -250,7 +250,9 @@ PortInsert::signal_latency() const
|
||||
bool
|
||||
PortInsert::configure_io (ChanCount in, ChanCount out)
|
||||
{
|
||||
#ifndef WIN32
|
||||
assert (!AudioEngine::instance()->process_lock().trylock());
|
||||
#endif
|
||||
|
||||
/* for an insert, processor input corresponds to IO output, and vice versa */
|
||||
|
||||
|
@ -1612,7 +1612,9 @@ Route::reset_instrument_info ()
|
||||
int
|
||||
Route::configure_processors (ProcessorStreams* err)
|
||||
{
|
||||
#ifndef WIN32
|
||||
assert (!AudioEngine::instance()->process_lock().trylock());
|
||||
#endif
|
||||
|
||||
if (!_in_configure_processors) {
|
||||
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
|
||||
@ -1682,7 +1684,9 @@ Route::try_configure_processors_unlocked (ChanCount in, ProcessorStreams* err)
|
||||
int
|
||||
Route::configure_processors_unlocked (ProcessorStreams* err)
|
||||
{
|
||||
#ifndef WIN32
|
||||
assert (!AudioEngine::instance()->process_lock().trylock());
|
||||
#endif
|
||||
|
||||
if (_in_configure_processors) {
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user