Hello, Jucey people. I’m stepping through code in the debugger and noticed an anomaly…
Let us look at AudioFormatWriter::writeFromAudioReader, on or about line 407…
maxChans is defined a few lines up as const int 128 (it should probably be a static const int to help the compiler optimize it out, but it probably does anyway…) and the signature of read() is:
bool AudioFormatReader::read (int** destSamples,
const bool fillLeftoverChannelsWithCopies)
So numDestChannels is 128 every time this line is called. This doesn’t seem right! I seem to be clearing 128 channels each time - but my source and target are two channels.
My theory is that line 407 should be: