1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +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

@@ -448,7 +448,7 @@ int ExportCL::Export(AudacityProject *project,
// Need to mix another block
if (numBytes == 0) {
sampleCount numSamples = mixer->Process(maxBlockLen);
auto numSamples = mixer->Process(maxBlockLen);
if (numSamples == 0) {
break;
}

View File

@@ -872,7 +872,7 @@ int ExportFFmpeg::Export(AudacityProject *project,
wxString::Format(_("Exporting entire file as %s"), ExportFFmpegOptions::fmts[mSubFormat].description));
while (updateResult == eProgressSuccess) {
sampleCount pcmNumSamples = mixer->Process(pcmBufferSize);
auto pcmNumSamples = mixer->Process(pcmBufferSize);
if (pcmNumSamples == 0)
break;

View File

@@ -324,7 +324,7 @@ int ExportFLAC::Export(AudacityProject *project,
_("Exporting the entire project as FLAC"));
while (updateResult == eProgressSuccess) {
sampleCount samplesThisRun = mixer->Process(SAMPLES_PER_RUN);
auto samplesThisRun = mixer->Process(SAMPLES_PER_RUN);
if (samplesThisRun == 0) { //stop encoding
break;
}

View File

@@ -274,7 +274,7 @@ int ExportMP2::Export(AudacityProject *project,
wxString::Format(_("Exporting entire file at %ld kbps"), bitrate));
while (updateResult == eProgressSuccess) {
sampleCount pcmNumSamples = mixer->Process(pcmBufferSize);
auto pcmNumSamples = mixer->Process(pcmBufferSize);
if (pcmNumSamples == 0)
break;

View File

@@ -1764,7 +1764,7 @@ int ExportMP3::Export(AudacityProject *project,
exporter.SetChannel(CHANNEL_STEREO);
}
sampleCount inSamples = exporter.InitializeStream(channels, rate);
auto inSamples = exporter.InitializeStream(channels, rate);
if (((int)inSamples) < 0) {
wxMessageBox(_("Unable to initialize MP3 stream"));
return false;
@@ -1829,7 +1829,7 @@ int ExportMP3::Export(AudacityProject *project,
ProgressDialog progress(wxFileName(fName).GetName(), title);
while (updateResult == eProgressSuccess) {
sampleCount blockLen = mixer->Process(inSamples);
auto blockLen = mixer->Process(inSamples);
if (blockLen == 0) {
break;

View File

@@ -255,7 +255,7 @@ int ExportOGG::Export(AudacityProject *project,
while (updateResult == eProgressSuccess && !eos) {
float **vorbis_buffer = vorbis_analysis_buffer(&dsp, SAMPLES_PER_RUN);
sampleCount samplesThisRun = mixer->Process(SAMPLES_PER_RUN);
auto samplesThisRun = mixer->Process(SAMPLES_PER_RUN);
if (samplesThisRun == 0) {
// Tell the library that we wrote 0 bytes - signalling the end.

View File

@@ -491,7 +491,7 @@ int ExportPCM::Export(AudacityProject *project,
while (updateResult == eProgressSuccess) {
sf_count_t samplesWritten;
sampleCount numSamples = mixer->Process(maxBlockLen);
auto numSamples = mixer->Process(maxBlockLen);
if (numSamples == 0)
break;