mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-20 14:47:49 +02:00
Allow reporting of drop-outs to be turned off by Recording prefs...
... Just in case it turns out to make some false positives.
This commit is contained in:
parent
0a93172265
commit
d2749068f1
@ -1867,6 +1867,7 @@ int AudioIO::StartStream(const WaveTrackConstArray &playbackTracks,
|
||||
{
|
||||
mLostSamples = 0;
|
||||
mLostCaptureIntervals.clear();
|
||||
mDetectDropouts = gPrefs->Read(wxT("/AudioIO/DetectDropouts"), true);
|
||||
auto cleanup = finally ( [this] { ClearRecordingException(); } );
|
||||
|
||||
if( IsBusy() )
|
||||
@ -5171,7 +5172,8 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
|
||||
// the other thread, executing FillBuffers, isn't consuming fast
|
||||
// enough from mCaptureBuffers; maybe it's CPU-bound, or maybe the
|
||||
// storage device it writes is too slow
|
||||
if (inputError || len < framesPerBuffer) {
|
||||
if (gAudioIO->mDetectDropouts &&
|
||||
(inputError || len < framesPerBuffer) ) {
|
||||
// Assume that any good partial buffer should be written leftmost
|
||||
// and zeroes will be padded after; label the zeroes.
|
||||
auto start = gAudioIO->mTime;
|
||||
|
@ -798,6 +798,7 @@ private:
|
||||
{ if (mRecordingException) wxAtomicDec( mRecordingException ); }
|
||||
|
||||
std::vector< std::pair<double, double> > mLostCaptureIntervals;
|
||||
bool mDetectDropouts{ true };
|
||||
|
||||
public:
|
||||
const std::vector< std::pair<double, double> > &LostCaptureIntervals()
|
||||
|
@ -166,6 +166,9 @@ void RecordingPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.TieCheckBox(_("Always record on a new track"),
|
||||
wxT("/GUI/PreferNewTrackRecord"),
|
||||
false);
|
||||
S.TieCheckBox(_("Detect dropouts"),
|
||||
wxT("/AudioIO/DetectDropouts"),
|
||||
true);
|
||||
}
|
||||
S.EndStatic();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user