summaryrefslogtreecommitdiff
path: root/libs/ardour/source.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/source.cc')
-rw-r--r--libs/ardour/source.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc
index 412f78c886..003fd35fe1 100644
--- a/libs/ardour/source.cc
+++ b/libs/ardour/source.cc
@@ -52,6 +52,9 @@ using namespace std;
using namespace ARDOUR;
using namespace PBD;
+PBD::Signal1<void,boost::shared_ptr<ARDOUR::Source> > Source::SourcePropertyChanged;
+
+
Source::Source (Session& s, DataType type, const string& name, Flag flags)
: SessionObject(s, name)
, _type(type)
@@ -292,7 +295,14 @@ Source::set_allow_remove_if_empty (bool yn)
void
Source::inc_use_count ()
{
- g_atomic_int_inc (&_use_count);
+ g_atomic_int_inc (&_use_count);
+
+ try {
+ boost::shared_ptr<Source> sptr = shared_from_this();
+ SourcePropertyChanged (sptr);
+ } catch (...) {
+ /* no shared_ptr available, relax; */
+ }
}
void
@@ -308,6 +318,13 @@ Source::dec_use_count ()
#else
g_atomic_int_add (&_use_count, -1);
#endif
+
+ try {
+ boost::shared_ptr<Source> sptr = shared_from_this();
+ SourcePropertyChanged (sptr);
+ } catch (...) {
+ /* no shared_ptr available, relax; */
+ }
}
bool