1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-02 17:23:18 +02:00

14 Commits

Author SHA1 Message Date
Paul Licameli
389ab0c8d0 Fewer calls to RingBuffer::Put in case of trailing zeroes...
... so there is only one update per track of the atomics in RingBuffer in each
pass of the loop in FillBuffers, which will be needed to synchronize RingBuffer
and TimeQueue correctly.
2018-08-25 20:08:09 -04:00
Paul-Licameli
7c544ace78 Newer MSVC compiler allows alignas 2018-07-04 23:35:50 -04:00
Paul Licameli
bd7e6f7279 Avoid false sharing of the two atomic variables of RingBuffer 2018-06-21 13:10:30 -04:00
Paul Licameli
22f48d31e1 Rewrite RingBuffer with standard atomics...
... Contrary to the old comments, this class was no longer thread safe with
multi-core, because of the possibility of out-of-order reads and writes.

Use the minimal necessary memory ordering, not the default and maybe expensive
std::memory_order_seq_cst

At least one clicky recording has been seen where many small groups of
samples, a common power in two in size, seem to get displaced rightward.

I suspect out of order reads and writes might have caused that and this commit
might prevent it.
2018-06-19 14:04:34 -04:00
Paul Licameli
a0bf2892fa Revert "Possibly correct some cases of clicky playback or corrupt recording..."
This reverts commit 6dca4f785904fd870d6829dd51aa0c56803012dc.
2018-06-13 19:07:39 -04:00
Paul Licameli
6dca4f7859 Possibly correct some cases of clicky playback or corrupt recording...
... By reusing portaudio's ring buffer class, which has more safe
inter-thread synchronization with memory fences
2018-03-17 23:44:50 -04:00
Paul Licameli
9777d3e880 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.
2018-01-15 14:48:39 -05:00
Paul Licameli
2910005780 Rewrite RingBuffer methods with size_t arguments and returns 2016-09-06 12:39:58 -04:00
Paul Licameli
321d5259a2 More uses of SampleBuffer, eliminating explicit DeleteSamples calls 2016-02-01 10:16:00 -05:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
lllucius
e5a4eecb25 Reverting r12591 as it was not complete and we're too close to
freeze to risk fixing it now.  Will readdress after 2.0.5 is 
released.

Basically, RingBuffer is ill equiped to handle an input stride
other than 1.

Thanks to Peter for testing this for me.
2013-10-07 12:37:15 +00:00
martynshaw99
4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
lllucius
f7aca4b474 Another case where extra deinterleaving isn't necessary. CopySamples() can do
the job quite nicely...well, given the "stride" information he needs.  And in
some cases, it will just use memcpy() so it may improve capture performance a
bit more.
2013-09-23 20:36:39 +00:00
ra
e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00