mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-18 09:00:52 +02:00
Correct limit of record duration when track rate differs from input
This commit is contained in:
parent
965a74cd9e
commit
20f3f76e2f
@ -4053,13 +4053,13 @@ void AudioIO::FillBuffers()
|
|||||||
* so that they get recorded
|
* so that they get recorded
|
||||||
*/
|
*/
|
||||||
if (toGet > 0 ) {
|
if (toGet > 0 ) {
|
||||||
|
if (double(toGet) > remainingSamples)
|
||||||
|
toGet = floor(remainingSamples);
|
||||||
const auto results =
|
const auto results =
|
||||||
mResample[i]->Process(mFactor, (float *)temp1.ptr(), toGet,
|
mResample[i]->Process(mFactor, (float *)temp1.ptr(), toGet,
|
||||||
!IsStreamActive(), (float *)temp2.ptr(), size);
|
!IsStreamActive(), (float *)temp2.ptr(), size);
|
||||||
size = results.second;
|
size = results.second;
|
||||||
// see comment in second handler about guarantee
|
// see comment in second handler about guarantee
|
||||||
if (double(size) > remainingSamples)
|
|
||||||
size = floor(remainingSamples);
|
|
||||||
mCaptureTracks[i]-> Append(temp2.ptr(), floatSample,
|
mCaptureTracks[i]-> Append(temp2.ptr(), floatSample,
|
||||||
size, 1,
|
size, 1,
|
||||||
&appendLog);
|
&appendLog);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user