mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-17 08:01:12 +02:00
Simplify iterations over WaveClips outside of WaveTrack/WaveClip; ...
... also add some const qualifiers
This commit is contained in:
committed by
Paul Licameli
parent
cb7872f980
commit
b548e641ae
@@ -178,15 +178,11 @@ void ODComputeSummaryTask::Update()
|
||||
{
|
||||
if(mWaveTracks[j])
|
||||
{
|
||||
WaveClip *clip;
|
||||
BlockArray *blocks;
|
||||
Sequence *seq;
|
||||
|
||||
//gather all the blockfiles that we should process in the wavetrack.
|
||||
WaveClipList::compatibility_iterator node = mWaveTracks[j]->GetClipIterator();
|
||||
|
||||
while(node) {
|
||||
clip = node->GetData();
|
||||
for (const auto &clip : mWaveTracks[j]->GetClips()) {
|
||||
seq = clip->GetSequence();
|
||||
//This lock may be way too big since the whole file is one sequence.
|
||||
//TODO: test for large files and find a way to break it down.
|
||||
@@ -223,7 +219,6 @@ void ODComputeSummaryTask::Update()
|
||||
tempBlocks.insert(tempBlocks.begin() + insertCursor++, odpcmaFile);
|
||||
}
|
||||
}
|
||||
node = node->GetNext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -136,15 +136,11 @@ void ODDecodeTask::Update()
|
||||
{
|
||||
if(mWaveTracks[j])
|
||||
{
|
||||
WaveClip *clip;
|
||||
BlockArray *blocks;
|
||||
Sequence *seq;
|
||||
|
||||
//gather all the blockfiles that we should process in the wavetrack.
|
||||
WaveClipList::compatibility_iterator node = mWaveTracks[j]->GetClipIterator();
|
||||
|
||||
while(node) {
|
||||
clip = node->GetData();
|
||||
for (const auto &clip : mWaveTracks[j]->GetClips()) {
|
||||
seq = clip->GetSequence();
|
||||
//TODO:this lock is way to big since the whole file is one sequence. find a way to break it down.
|
||||
seq->LockDeleteUpdateMutex();
|
||||
@@ -179,7 +175,6 @@ void ODDecodeTask::Update()
|
||||
}
|
||||
|
||||
seq->UnlockDeleteUpdateMutex();
|
||||
node = node->GetNext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user