add API to query a processor's frozen state.

This commit is contained in:
Robin Gareus 2014-06-04 02:23:24 +02:00 committed by Paul Davis
parent d4ea9c3ac7
commit 630565aad6
3 changed files with 17 additions and 0 deletions

View file

@ -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&);

View file

@ -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.
*/

View file

@ -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 ()
{