1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-17 16:11:11 +02:00

Remove many mentions of sampleCount with auto and decltype...

... This makes much code agnostic about how other things (functions and
arguments) are typed.

Many of these neeed to become size_t instead of sampleCount.
This commit is contained in:
Paul Licameli
2016-08-24 11:24:26 -04:00
parent b8c1d02058
commit 79c79f9cd3
69 changed files with 424 additions and 459 deletions

View File

@@ -240,7 +240,7 @@ void ODComputeSummaryTask::OrderBlockFiles
//Note that this code assumes that the array is sorted in time.
//find the startpoint
sampleCount processStartSample = GetDemandSample();
auto processStartSample = GetDemandSample();
for(int i= ((int)unorderedBlocks.size())-1;i>= 0;i--)
{
//check to see if the refcount is at least two before we add it to the list.

View File

@@ -365,7 +365,7 @@ int ODFFmpegDecoder::Decode(SampleBuffer & data, sampleFormat & format, sampleCo
if (sc != (streamContext*)1)
{
//find out the dts we've seekd to. can't use the stream->cur_dts because it is faulty. also note that until we do the first seek, pkt.dts can be false and will change for the same samples after the initial seek.
sampleCount actualDecodeStart = mCurrentPos;
auto actualDecodeStart = mCurrentPos;
// we need adjacent samples, so don't use dts most of the time which will leave gaps between frames
// for some formats

View File

@@ -193,7 +193,7 @@ void ODDecodeTask::OrderBlockFiles
//(which the user sets by clicking.) note that this code is pretty hacky - it assumes that the array is sorted in time.
//find the startpoint
sampleCount processStartSample = GetDemandSample();
auto processStartSample = GetDemandSample();
for(int i= ((int)unorderedBlocks.size())-1;i>= 0;i--)
{
//check to see if the refcount is at least two before we add it to the list.

View File

@@ -329,7 +329,7 @@ void ODTask::DemandTrackUpdate(WaveTrack* track, double seconds)
{
if(track == mWaveTracks[i])
{
sampleCount newDemandSample = (sampleCount)(seconds * track->GetRate());
auto newDemandSample = (sampleCount)(seconds * track->GetRate());
demandSampleChanged = newDemandSample != GetDemandSample();
SetDemandSample(newDemandSample);
break;