1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-13 14:13:32 +02:00

WaveTrack.cpp does not depend on ODManager.cpp ...

... Breaking up an s.c.c. of 6 into 3 components:
ODManager, ODTask, ODWaveTrackTaskQueue
UndoManager
WaveClip, WaveTrack

Rewrite the OD tasks and queues to hold weak pointers to tracks, so the
track destructor need not notify them.
This commit is contained in:
Paul Licameli
2019-06-05 11:46:07 -04:00
parent 71250b1dc3
commit 86320838de
16 changed files with 101 additions and 120 deletions

View File

@@ -588,7 +588,7 @@ ProgressResult FFmpegImportFileHandle::Import(TrackFactory *trackFactory,
//for each wavetrack within the stream add coded blockfiles
for (int c = 0; c < sc->m_stream->codec->channels; c++) {
WaveTrack *t = stream[c].get();
auto t = stream[c];
odTask->AddWaveTrack(t);
auto maxBlockSize = t->GetMaxBlockSize();

View File

@@ -505,7 +505,7 @@ ProgressResult FLACImportFileHandle::Import(TrackFactory *trackFactory,
bool moreThanStereo = mNumChannels>2;
for (const auto &channel : mChannels)
{
mDecoderTask->AddWaveTrack(channel.get());
mDecoderTask->AddWaveTrack(channel);
if(moreThanStereo)
{
//if we have 3 more channels, they get imported on seperate tracks, so we add individual tasks for each.

View File

@@ -445,7 +445,7 @@ ProgressResult PCMImportFileHandle::Import(TrackFactory *trackFactory,
bool moreThanStereo = mInfo.channels>2;
for (const auto &channel : channels)
{
computeTask->AddWaveTrack(channel.get());
computeTask->AddWaveTrack(channel);
if(moreThanStereo)
{
//if we have 3 more channels, they get imported on seperate tracks, so we add individual tasks for each.