1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-07 15:49:42 +02:00

Comments where casting to sampleCount from other library typedefs

This commit is contained in:
Paul Licameli 2016-09-06 09:19:04 -04:00
parent c9a9ad6220
commit d23c20c5d1
4 changed files with 9 additions and 4 deletions

View File

@ -487,7 +487,8 @@ int FLACImportFileHandle::Import(TrackFactory *trackFactory,
//add the task to the ODManager
if(useOD)
{
auto fileTotalFrames = (sampleCount)mNumSamples;
auto fileTotalFrames =
(sampleCount)mNumSamples; // convert from FLAC__uint64
auto maxBlockSize = mChannels.begin()->get()->GetMaxBlockSize();
for (decltype(fileTotalFrames) i = 0; i < fileTotalFrames; i += maxBlockSize) {
const auto blockLen =

View File

@ -367,7 +367,8 @@ int PCMImportFileHandle::Import(TrackFactory *trackFactory,
channels.begin()->get()->SetLinked(true);
}
auto fileTotalFrames = (sampleCount)mInfo.frames;
auto fileTotalFrames =
(sampleCount)mInfo.frames; // convert from sf_count_t
auto maxBlockSize = channels.begin()->get()->GetMaxBlockSize();
int updateResult = false;

View File

@ -233,7 +233,8 @@ int QTImportFileHandle::Import(TrackFactory *trackFactory,
OSErr err = noErr;
MovieAudioExtractionRef maer = NULL;
int updateResult = eProgressSuccess;
auto totSamples = (sampleCount) GetMovieDuration(mMovie);
auto totSamples =
(sampleCount) GetMovieDuration(mMovie); // convert from TimeValue
decltype(totSamples) numSamples = 0;
Boolean discrete = true;
UInt32 quality = kQTAudioRenderQuality_Max;

View File

@ -175,7 +175,9 @@ void ImportRaw(wxWindow *parent, const wxString &fileName,
SFCall<sf_count_t>(sf_seek, sndFile.get(), 0, SEEK_SET);
auto totalFrames = (sampleCount)(sndInfo.frames * percent / 100.0);
auto totalFrames =
// fraction of a sf_count_t value
(sampleCount)(sndInfo.frames * percent / 100.0);
//
// Sample format: