solo and mute buttons are now implemented

This commit is contained in:
itsmattkc
2019-04-03 12:15:03 +11:00
parent d504ee6302
commit f3178ff071
3 changed files with 24 additions and 1 deletions
+2 -1
View File
@@ -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)
+21
View File
@@ -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_;
+1
View File
@@ -86,6 +86,7 @@ public:
long GetEndFrame();
bool IsEffectivelyMuted();
bool IsMuted();
bool IsSoloed();
bool IsLocked();