1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +02:00

When recording into region selection, stop it precisely

This commit is contained in:
Paul Licameli
2018-05-24 02:35:44 -04:00
parent 92d27c618b
commit 0887d6d01e
2 changed files with 54 additions and 14 deletions

View File

@@ -814,6 +814,19 @@ public:
// Whether to check the error code passed to audacityAudioCallback to
// detect more dropouts
bool mDetectUpstreamDropouts{ true };
private:
struct RecordingSchedule {
double mLatencyCorrection{};
double mDuration{};
// This is initialized to 0 by the main thread, then updated
// only by the thread calling FillBuffers:
double mPosition{};
double Remaining() const
{ return mDuration - mLatencyCorrection - mPosition; }
} mRecordingSchedule{};
};
#endif