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;
|
mLostSamples = 0;
|
||||||
mLostCaptureIntervals.clear();
|
mLostCaptureIntervals.clear();
|
||||||
|
mDetectDropouts = gPrefs->Read(wxT("/AudioIO/DetectDropouts"), true);
|
||||||
auto cleanup = finally ( [this] { ClearRecordingException(); } );
|
auto cleanup = finally ( [this] { ClearRecordingException(); } );
|
||||||
|
|
||||||
if( IsBusy() )
|
if( IsBusy() )
|
||||||
@ -5171,7 +5172,8 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
|
|||||||
// the other thread, executing FillBuffers, isn't consuming fast
|
// the other thread, executing FillBuffers, isn't consuming fast
|
||||||
// enough from mCaptureBuffers; maybe it's CPU-bound, or maybe the
|
// enough from mCaptureBuffers; maybe it's CPU-bound, or maybe the
|
||||||
// storage device it writes is too slow
|
// 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
|
// Assume that any good partial buffer should be written leftmost
|
||||||
// and zeroes will be padded after; label the zeroes.
|
// and zeroes will be padded after; label the zeroes.
|
||||||
auto start = gAudioIO->mTime;
|
auto start = gAudioIO->mTime;
|
||||||
|
@ -798,6 +798,7 @@ private:
|
|||||||
{ if (mRecordingException) wxAtomicDec( mRecordingException ); }
|
{ if (mRecordingException) wxAtomicDec( mRecordingException ); }
|
||||||
|
|
||||||
std::vector< std::pair<double, double> > mLostCaptureIntervals;
|
std::vector< std::pair<double, double> > mLostCaptureIntervals;
|
||||||
|
bool mDetectDropouts{ true };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const std::vector< std::pair<double, double> > &LostCaptureIntervals()
|
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"),
|
S.TieCheckBox(_("Always record on a new track"),
|
||||||
wxT("/GUI/PreferNewTrackRecord"),
|
wxT("/GUI/PreferNewTrackRecord"),
|
||||||
false);
|
false);
|
||||||
|
S.TieCheckBox(_("Detect dropouts"),
|
||||||
|
wxT("/AudioIO/DetectDropouts"),
|
||||||
|
true);
|
||||||
}
|
}
|
||||||
S.EndStatic();
|
S.EndStatic();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user