1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 00:03:52 +02:00

SAMPLE_SIZE macro returns size_t

This commit is contained in:
Paul Licameli
2016-09-06 07:40:49 -04:00
parent c9bff2f0f4
commit b093a8e406
6 changed files with 15 additions and 15 deletions

View File

@@ -480,7 +480,7 @@ bool Sequence::Paste(sampleCount s, const Sequence *src)
const BlockArray &srcBlock = src->mBlock;
auto addedLen = src->mNumSamples;
const unsigned int srcNumBlocks = srcBlock.size();
int sampleSize = SAMPLE_SIZE(mSampleFormat);
auto sampleSize = SAMPLE_SIZE(mSampleFormat);
if (addedLen == 0 || srcNumBlocks == 0)
return true;
@@ -1116,7 +1116,7 @@ bool Sequence::CopyWrite(SampleBuffer &scratch,
wxASSERT(start + len <= length);
wxASSERT(start >= 0);
int sampleSize = SAMPLE_SIZE(mSampleFormat);
auto sampleSize = SAMPLE_SIZE(mSampleFormat);
Read(scratch.ptr(), mSampleFormat, b, 0, length);
memcpy(scratch.ptr() + start*sampleSize, buffer, len*sampleSize);
@@ -1590,7 +1590,7 @@ bool Sequence::Delete(sampleCount start, sampleCount len)
const unsigned int b0 = FindBlock(start);
unsigned int b1 = FindBlock(start + len - 1);
int sampleSize = SAMPLE_SIZE(mSampleFormat);
auto sampleSize = SAMPLE_SIZE(mSampleFormat);
// Special case: if the samples to DELETE are all within a single
// block and the resulting length is not too small, perform the