solo and mute buttons are now implemented
This commit is contained in:
+2
-1
@@ -86,7 +86,8 @@ bool Clip::IsActiveAt(long timecode)
|
||||
return enabled()
|
||||
&& timeline_in(true) < timecode
|
||||
&& timeline_out(true) > timecode
|
||||
&& timecode - timeline_in(true) + clip_in(true) < media_length();
|
||||
&& timecode - timeline_in(true) + clip_in(true) < media_length()
|
||||
&& !track()->IsEffectivelyMuted();
|
||||
}
|
||||
|
||||
bool Clip::IsSelected(bool containing)
|
||||
|
||||
@@ -345,6 +345,27 @@ long Track::GetEndFrame()
|
||||
return end_frame;
|
||||
}
|
||||
|
||||
bool Track::IsEffectivelyMuted()
|
||||
{
|
||||
// Check if this track is muted
|
||||
if (muted_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if any tracks are soloed
|
||||
bool a_track_is_soloed = false;
|
||||
|
||||
for (int i=0;i<track_list()->TrackCount();i++) {
|
||||
if (track_list()->TrackAt(i)->IsSoloed()) {
|
||||
a_track_is_soloed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Return if a track is soloed and this track is not soloed
|
||||
return (a_track_is_soloed && !soloed_);
|
||||
}
|
||||
|
||||
bool Track::IsMuted()
|
||||
{
|
||||
return muted_;
|
||||
|
||||
@@ -86,6 +86,7 @@ public:
|
||||
|
||||
long GetEndFrame();
|
||||
|
||||
bool IsEffectivelyMuted();
|
||||
bool IsMuted();
|
||||
bool IsSoloed();
|
||||
bool IsLocked();
|
||||
|
||||
Reference in New Issue
Block a user