diff options
author | Robin Gareus <robin@gareus.org> | 2014-06-04 02:23:24 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-06-04 02:23:24 +0200 |
commit | a771dea20332bf31162ccb13a518e0348b441dd1 (patch) | |
tree | e67de62436aaa930d199b64f997f4272a14484ba | |
parent | 0889336aac57f9e0dde9a25f51db5fffb9f069d2 (diff) |
add API to query a processor's frozen state.
-rw-r--r-- | libs/ardour/ardour/audio_track.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/track.h | 1 | ||||
-rw-r--r-- | libs/ardour/audio_track.cc | 15 |
3 files changed, 17 insertions, 0 deletions
diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h index 0bc8be81f4..ace5a041ce 100644 --- a/libs/ardour/ardour/audio_track.h +++ b/libs/ardour/ardour/audio_track.h @@ -52,6 +52,7 @@ class LIBARDOUR_API AudioTrack : public Track void freeze_me (InterThreadInfo&); void unfreeze (); + bool frozen_processor(PBD::ID const) const; bool bounceable (boost::shared_ptr<Processor>, bool include_endpoint) const; boost::shared_ptr<Region> bounce (InterThreadInfo&); diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index 736ca8c6dd..7691981fa4 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -88,6 +88,7 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream virtual void freeze_me (InterThreadInfo&) = 0; virtual void unfreeze () = 0; + virtual bool frozen_processor(PBD::ID const) const { return false; } /** @return true if the track can be bounced, or false otherwise. */ diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 13d5c43dda..5b9df22a7b 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -601,6 +601,21 @@ AudioTrack::freeze_me (InterThreadInfo& itt) FreezeChange(); /* EMIT SIGNAL */ } +bool +AudioTrack::frozen_processor(PBD::ID const id) const +{ + if (freeze_state() != AudioTrack::Frozen) { + return false; + } + + for (vector<FreezeRecordProcessorInfo*>::const_iterator ii = _freeze_record.processor_info.begin(); ii != _freeze_record.processor_info.end(); ++ii) { + if ((*ii)->id == id) { + return true; + } + } + return false; +} + void AudioTrack::unfreeze () { |