mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-08 14:13:57 +01:00
Merge pull request #43 from spider-mario/stereo-to-mono-effects
Prevent stereo->mono effects from causing a crash.
This commit is contained in:
@@ -1749,7 +1749,14 @@ bool Effect::ProcessTrack(int count,
|
||||
left->Set((samplePtr) mOutBuffer[0], floatSample, outLeftPos, outputBufferCnt);
|
||||
if (right)
|
||||
{
|
||||
right->Set((samplePtr) mOutBuffer[1], floatSample, outRightPos, outputBufferCnt);
|
||||
if (chans >= 2)
|
||||
{
|
||||
right->Set((samplePtr) mOutBuffer[1], floatSample, outRightPos, outputBufferCnt);
|
||||
}
|
||||
else
|
||||
{
|
||||
right->Set((samplePtr) mOutBuffer[0], floatSample, outRightPos, outputBufferCnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (isGenerator)
|
||||
@@ -1799,7 +1806,14 @@ bool Effect::ProcessTrack(int count,
|
||||
left->Set((samplePtr) mOutBuffer[0], floatSample, outLeftPos, outputBufferCnt);
|
||||
if (right)
|
||||
{
|
||||
right->Set((samplePtr) mOutBuffer[1], floatSample, outRightPos, outputBufferCnt);
|
||||
if (chans >= 2)
|
||||
{
|
||||
right->Set((samplePtr) mOutBuffer[1], floatSample, outRightPos, outputBufferCnt);
|
||||
}
|
||||
else
|
||||
{
|
||||
right->Set((samplePtr) mOutBuffer[0], floatSample, outRightPos, outputBufferCnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (isGenerator)
|
||||
|
||||
Reference in New Issue
Block a user