From 37978aa21437b9bb308efeb9828fbe4a06077cee Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 26 Jun 2010 13:45:59 +0000 Subject: lots of details relating to MIDI file management; try to ignore ALSA sequencer MIDI ports named "Midi-Through" git-svn-id: svn://localhost/ardour2/branches/3.0@7305 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/source.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libs/ardour/source.cc') diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc index 55ce9f8bef..894233f436 100644 --- a/libs/ardour/source.cc +++ b/libs/ardour/source.cc @@ -272,3 +272,17 @@ Source::set_allow_remove_if_empty (bool yn) } } +void +Source::dec_use_count () +{ +#ifndef NDEBUG + gint oldval = g_atomic_int_exchange_and_add (&_use_count, -1); + cerr << "Bad use dec for " << name() << endl; + if (oldval <= 0) { + abort (); + } + assert (oldval > 0); +#else + g_atomic_int_exchange_and_add (&_use_count, -1); +#endif +} -- cgit v1.2.3