mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-15 09:01:12 +01:00
TrackList has back-pointer to project...
... and Track::GetOwner() is publicized, so that now you can find the the AudacityProject, if any, that owns a given Track; this will help eliminate some uses of GetActiveProject
This commit is contained in:
@@ -1983,7 +1983,7 @@ void Effect::CopyInputTracks(bool allSyncLockSelected)
|
||||
mIMap.clear();
|
||||
mOMap.clear();
|
||||
|
||||
mOutputTracks = TrackList::Create();
|
||||
mOutputTracks = TrackList::Create( nullptr );
|
||||
|
||||
auto trackRange = mTracks->Any() +
|
||||
[&] (const Track *pTrack) {
|
||||
@@ -2271,7 +2271,9 @@ void Effect::Preview(bool dryOnly)
|
||||
} );
|
||||
|
||||
// Build NEW tracklist from rendering tracks
|
||||
auto uTracks = TrackList::Create();
|
||||
// Set the same owning project, so FindProject() can see it within Process()
|
||||
const auto pProject = saveTracks->GetOwner();
|
||||
auto uTracks = TrackList::Create( pProject );
|
||||
mTracks = uTracks.get();
|
||||
|
||||
// Linear Effect preview optimised by pre-mixing to one track.
|
||||
|
||||
@@ -339,7 +339,7 @@ bool EffectEqualization48x::TrackCompare()
|
||||
SecondIMap.clear();
|
||||
SecondOMap.clear();
|
||||
|
||||
auto pSecondOutputTracks = TrackList::Create();
|
||||
auto pSecondOutputTracks = TrackList::Create( nullptr );
|
||||
auto &SecondOutputTracks = *pSecondOutputTracks;
|
||||
|
||||
for (auto aTrack :
|
||||
|
||||
Reference in New Issue
Block a user