1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +02:00

Move mute and solo state into PlayableTrack

This commit is contained in:
Paul Licameli
2017-03-29 11:25:05 -04:00
parent ed0088491c
commit 6c4cf46c06
13 changed files with 165 additions and 84 deletions

View File

@@ -425,7 +425,9 @@ bool Exporter::ExamineTracks()
while (tr) {
if (tr->GetKind() == Track::Wave) {
if ( (tr->GetSelected() || !mSelectedOnly) && !tr->GetMute() ) { // don't count muted tracks
auto wt = static_cast<const WaveTrack *>(tr);
if ( (tr->GetSelected() || !mSelectedOnly) &&
!wt->GetMute() ) { // don't count muted tracks
mNumSelected++;
if (tr->GetChannel() == Track::LeftChannel) {
@@ -1255,7 +1257,9 @@ ExportMixerDialog::ExportMixerDialog( const TrackList *tracks, bool selectedOnly
for( const Track *t = iter.First(); t; t = iter.Next() )
{
if( t->GetKind() == Track::Wave && ( t->GetSelected() || !selectedOnly ) && !t->GetMute() )
auto wt = static_cast<const WaveTrack *>(t);
if( t->GetKind() == Track::Wave && ( t->GetSelected() || !selectedOnly ) &&
!wt->GetMute() )
{
numTracks++;
const wxString sTrackName = (t->GetName()).Left(20);

View File

@@ -154,7 +154,8 @@ void ExportMultiple::CountTracksAndLabels()
// Count WaveTracks, and for linked pairs, count only the second of the pair.
case Track::Wave:
{
if (!pTrack->GetMute() && !pTrack->GetLinked()) // Don't count muted tracks.
auto wt = static_cast<const WaveTrack *>(pTrack);
if (!wt->GetMute() && !pTrack->GetLinked()) // Don't count muted tracks.
mNumWaveTracks++;
break;
}
@@ -811,7 +812,9 @@ ProgressResult ExportMultiple::ExportMultipleByTrack(bool byName,
for (tr = iter.First(mTracks); tr != NULL; tr = iter.Next()) {
// Want only non-muted wave tracks.
if ((tr->GetKind() != Track::Wave) || tr->GetMute())
auto wt = static_cast<const WaveTrack *>(tr);
if ((tr->GetKind() != Track::Wave) ||
wt->GetMute())
continue;
// Get the times for the track
@@ -898,7 +901,8 @@ ProgressResult ExportMultiple::ExportMultipleByTrack(bool byName,
for (tr = iter.First(mTracks); tr != NULL; tr = iter.Next()) {
// Want only non-muted wave tracks.
if ((tr->GetKind() != Track::Wave) || (tr->GetMute() == true)) {
auto wt = static_cast<const WaveTrack *>(tr);
if ((tr->GetKind() != Track::Wave) || (wt->GetMute())) {
continue;
}