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

Alert user to drop-outs during recording...

1) When the program detects this, insert zeroes into the recording to keep the
other good parts synchronized.

2) When recording stops, a message box alerts the user, and a label track is
added showing the lost parts, labelled with consecutive numbers.

3) A menu item visible in alpha builds only is added to Tools, to simulate
recording errors at random times and test the reporting feature.
This commit is contained in:
Paul Licameli
2018-01-15 14:48:39 -05:00
parent 4ef8da8f16
commit 9777d3e880
8 changed files with 121 additions and 10 deletions

View File

@@ -18,6 +18,7 @@
#include "Experimental.h"
#include "MemoryX.h"
#include <utility>
#include <vector>
#include <wx/atomic.h>
@@ -677,7 +678,7 @@ private:
unsigned int mNumCaptureChannels;
unsigned int mNumPlaybackChannels;
sampleFormat mCaptureFormat;
int mLostSamples;
unsigned long long mLostSamples{ 0 };
volatile bool mAudioThreadShouldCallFillBuffersOnce;
volatile bool mAudioThreadFillBuffersLoopRunning;
volatile bool mAudioThreadFillBuffersLoopActive;
@@ -795,6 +796,15 @@ private:
{ wxAtomicInc( mRecordingException ); }
void ClearRecordingException()
{ if (mRecordingException) wxAtomicDec( mRecordingException ); }
std::vector< std::pair<double, double> > mLostCaptureIntervals;
public:
const std::vector< std::pair<double, double> > &LostCaptureIntervals()
{ return mLostCaptureIntervals; }
// Used only for testing purposes in alpha builds
bool mSimulateRecordingErrors{ false };
};
#endif