1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-01 20:14:49 +02:00

Track factory cleanup (#646)

* Don't need TrackFactory to make LabelTrack

* Don't need TrackFactory to make NoteTrack

* Don't need TrackFactory to make TimeTrack, or ZoomInfo in the factory

* Remove some forward declarations

* Rename TrackFactory as WaveTrackFactory, move it out of Track.cpp
This commit is contained in:
Paul Licameli
2020-08-22 19:44:49 -04:00
committed by GitHub
parent 0f98522b5c
commit 4ca3e7096f
42 changed files with 158 additions and 198 deletions

View File

@@ -675,7 +675,7 @@ bool ProjectAudioManager::DoRecord(AudacityProject &project,
Track *first {};
for (int c = 0; c < recordingChannels; c++) {
auto newTrack = TrackFactory::Get( *p ).NewWaveTrack();
auto newTrack = WaveTrackFactory::Get( *p ).NewWaveTrack();
if (!first)
first = newTrack.get();
@@ -892,7 +892,7 @@ void ProjectAudioManager::OnAudioIOStopRecording()
auto &intervals = gAudioIO->LostCaptureIntervals();
if (intervals.size()) {
// Make a track with labels for recording errors
auto uTrack = TrackFactory::Get( project ).NewLabelTrack();
auto uTrack = std::make_shared<LabelTrack>();
auto pTrack = uTrack.get();
tracks.Add( uTrack );
/* i18n-hint: A name given to a track, appearing as its menu button.