mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-05 19:21:59 +01:00
Paul L's new SelectedRegion class replacing use of t0 and t1. Also LabelTrack.h no longer in TrackPanel.h includes.
This change is believed to be a direct refactoring that does not change functionality. It paves the way for more complex kinds of selection, such as selections involving frequency as well as time. It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
This commit is contained in:
@@ -400,8 +400,8 @@ void FreqWindow::GetAudio()
|
||||
if (selcount==0) {
|
||||
mRate = track->GetRate();
|
||||
sampleCount start, end;
|
||||
start = track->TimeToLongSamples(p->mViewInfo.sel0);
|
||||
end = track->TimeToLongSamples(p->mViewInfo.sel1);
|
||||
start = track->TimeToLongSamples(p->mViewInfo.selectedRegion.t0());
|
||||
end = track->TimeToLongSamples(p->mViewInfo.selectedRegion.t1());
|
||||
mDataLen = (sampleCount)(end - start);
|
||||
if (mDataLen > 10485760) {
|
||||
warning = true;
|
||||
@@ -421,7 +421,7 @@ void FreqWindow::GetAudio()
|
||||
return;
|
||||
}
|
||||
sampleCount start;
|
||||
start = track->TimeToLongSamples(p->mViewInfo.sel0);
|
||||
start = track->TimeToLongSamples(p->mViewInfo.selectedRegion.t0());
|
||||
float *buffer2 = new float[mDataLen];
|
||||
track->Get((samplePtr)buffer2, floatSample, start, mDataLen);
|
||||
for(i=0; i<mDataLen; i++)
|
||||
|
||||
Reference in New Issue
Block a user