1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-06 11:42:17 +01: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

@@ -76,19 +76,19 @@ const wxChar *GetSampleFormatStr(sampleFormat format)
}
// TODO: Risky? Assumes 0.0f is represented by 0x00000000;
void ClearSamples(samplePtr src, sampleFormat format,
void ClearSamples(samplePtr dst, sampleFormat format,
size_t start, size_t len)
{
auto size = SAMPLE_SIZE(format);
memset(src + start*size, 0, len*size);
memset(dst + start*size, 0, len*size);
}
void ReverseSamples(samplePtr src, sampleFormat format,
void ReverseSamples(samplePtr dst, sampleFormat format,
int start, int len)
{
auto size = SAMPLE_SIZE(format);
samplePtr first = src + start * size;
samplePtr last = src + (start + len - 1) * size;
samplePtr first = dst + start * size;
samplePtr last = dst + (start + len - 1) * size;
enum : size_t { fixedSize = SAMPLE_SIZE(floatSample) };
wxASSERT(size <= fixedSize);
char temp[fixedSize];