mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-28 14:18:41 +02:00
Bug 1863: Windows crash when resampling in WASAPI
Problem: soxr_process doesn't like being called with length of buffers equal to zero. Fix: don't call it, when this is the case.
This commit is contained in:
parent
318967f00d
commit
a22be24ae3
@ -4064,6 +4064,7 @@ void AudioIO::FillBuffers()
|
||||
* must flush any samples left in the rate conversion buffer
|
||||
* so that they get recorded
|
||||
*/
|
||||
if (avail > 0 ) {
|
||||
const auto results =
|
||||
mResample[i]->Process(mFactor, (float *)temp1.ptr(), avail,
|
||||
!IsStreamActive(), (float *)temp2.ptr(), size);
|
||||
@ -4072,6 +4073,7 @@ void AudioIO::FillBuffers()
|
||||
mCaptureTracks[i]-> Append(temp2.ptr(), floatSample, size, 1,
|
||||
&appendLog);
|
||||
}
|
||||
}
|
||||
|
||||
if (!appendLog.IsEmpty())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user