1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-06 19:52:19 +01: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

@@ -88,17 +88,17 @@ AUDACITY_DLL_API void DeleteSamples(samplePtr p)
void ClearSamples(samplePtr src, sampleFormat format,
int start, int len)
{
int size = SAMPLE_SIZE(format);
auto size = SAMPLE_SIZE(format);
memset(src + start*size, 0, len*size);
}
void ReverseSamples(samplePtr src, sampleFormat format,
int start, int len)
{
int size = SAMPLE_SIZE(format);
auto size = SAMPLE_SIZE(format);
samplePtr first = src + start * size;
samplePtr last = src + (start + len - 1) * size;
enum { fixedSize = SAMPLE_SIZE(floatSample) };
enum : size_t { fixedSize = SAMPLE_SIZE(floatSample) };
wxASSERT(size <= fixedSize);
char temp[fixedSize];
while (first < last) {