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

Type agnosticism for some other variables that were not sampleCount...

... in some cases, this fixes narrowings.
This commit is contained in:
Paul Licameli
2016-08-24 07:56:33 -04:00
parent 79c79f9cd3
commit fd2b050d6f
16 changed files with 26 additions and 29 deletions

View File

@@ -311,7 +311,7 @@ int ExportFLAC::Export(AudacityProject *project,
numChannels, SAMPLES_PER_RUN, false,
rate, format, true, mixerSpec);
int i, j;
int i;
FLAC__int32 **tmpsmplbuf = new FLAC__int32*[numChannels];
for (i = 0; i < numChannels; i++) {
tmpsmplbuf[i] = (FLAC__int32 *) calloc(SAMPLES_PER_RUN, sizeof(FLAC__int32));
@@ -332,12 +332,12 @@ int ExportFLAC::Export(AudacityProject *project,
for (i = 0; i < numChannels; i++) {
samplePtr mixed = mixer->GetBuffer(i);
if (format == int24Sample) {
for (j = 0; j < samplesThisRun; j++) {
for (decltype(samplesThisRun) j = 0; j < samplesThisRun; j++) {
tmpsmplbuf[i][j] = ((int *)mixed)[j];
}
}
else {
for (j = 0; j < samplesThisRun; j++) {
for (decltype(samplesThisRun) j = 0; j < samplesThisRun; j++) {
tmpsmplbuf[i][j] = ((short *)mixed)[j];
}
}