mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-10 17:11:17 +02: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:
commit
3d47af8ef5
@ -1749,7 +1749,14 @@ bool Effect::ProcessTrack(int count,
|
|||||||
left->Set((samplePtr) mOutBuffer[0], floatSample, outLeftPos, outputBufferCnt);
|
left->Set((samplePtr) mOutBuffer[0], floatSample, outLeftPos, outputBufferCnt);
|
||||||
if (right)
|
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)
|
else if (isGenerator)
|
||||||
@ -1799,7 +1806,14 @@ bool Effect::ProcessTrack(int count,
|
|||||||
left->Set((samplePtr) mOutBuffer[0], floatSample, outLeftPos, outputBufferCnt);
|
left->Set((samplePtr) mOutBuffer[0], floatSample, outLeftPos, outputBufferCnt);
|
||||||
if (right)
|
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)
|
else if (isGenerator)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user