mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
As mentioned in commit message for 12574, here is one example of a routine
that was doing extra processing because Dither couldn't return interleaved buffers.
This commit is contained in:
parent
a3d27b135b
commit
7ddd4ed2ab
@ -3217,25 +3217,19 @@ static void DoSoftwarePlaythrough(const void *inputBuffer,
|
||||
float *outputBuffer,
|
||||
int len)
|
||||
{
|
||||
float *tempBuffer = (float *)alloca(len * sizeof(float));
|
||||
int i, j;
|
||||
|
||||
for(j=0; j<inputChannels; j++) {
|
||||
samplePtr inputPtr = ((samplePtr)inputBuffer) + (j * SAMPLE_SIZE(inputFormat));
|
||||
for (int i=0; i < inputChannels; i++) {
|
||||
samplePtr inputPtr = ((samplePtr)inputBuffer) + (i * SAMPLE_SIZE(inputFormat));
|
||||
samplePtr outputPtr = ((samplePtr)outputBuffer) + (i * SAMPLE_SIZE(floatSample));
|
||||
|
||||
CopySamples(inputPtr, inputFormat,
|
||||
(samplePtr)tempBuffer, floatSample,
|
||||
len, true, inputChannels);
|
||||
|
||||
for(i=0; i<len; i++)
|
||||
outputBuffer[2*i + (j%2)] = tempBuffer[i];
|
||||
(samplePtr)outputPtr, floatSample,
|
||||
len, true, inputChannels, 2);
|
||||
}
|
||||
|
||||
// One mono input channel goes to both output channels...
|
||||
if (inputChannels == 1)
|
||||
for(i=0; i<len; i++)
|
||||
outputBuffer[2*i + 1] = tempBuffer[i];
|
||||
}
|
||||
|
||||
for (int i=0; i < len; i++)
|
||||
outputBuffer[2*i + 1] = outputBuffer[2*i];
|
||||
}
|
||||
|
||||
int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
|
||||
|
Loading…
x
Reference in New Issue
Block a user