diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-26 13:45:59 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-26 13:45:59 +0000 |
commit | 37978aa21437b9bb308efeb9828fbe4a06077cee (patch) | |
tree | f7b3b681e0e42c233ded6715ea824114d9e5c3ec /libs/ardour/source.cc | |
parent | ecb0cd5d119d28092a8f48e4521ac5eba197bb54 (diff) |
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
Diffstat (limited to 'libs/ardour/source.cc')
-rw-r--r-- | libs/ardour/source.cc | 14 |
1 files changed, 14 insertions, 0 deletions
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 +} |