1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-19 09:30:06 +02:00

147 Commits

Author SHA1 Message Date
Paul Licameli
837a96d18a Scrub queue records positions as sampleCount not long 2016-09-04 16:28:40 -04:00
Paul Licameli
954a914ff7 A little more type agnosticism 2016-08-26 12:42:22 -04:00
Paul Licameli
79c79f9cd3 Remove many mentions of sampleCount with auto and decltype...
... This makes much code agnostic about how other things (functions and
arguments) are typed.

Many of these neeed to become size_t instead of sampleCount.
2016-08-24 14:50:45 -04:00
Paul Licameli
15a60bde4b Fix linux debug complaints of missing thread shut-down...
... caused by commit b47bcb548e7866c1a44a4600ffbeff0ae0445516
2016-08-15 21:21:09 -04:00
Paul Licameli
a52f7f8410 new -> NEW in comments, so text search for naked new excludes them 2016-08-08 10:07:37 -04:00
Paul Licameli
b47bcb548e Remove some naked new amd delete in: AudioIO 2016-08-08 07:51:27 -04:00
Paul Licameli
27527ebf5c One less indirection for arrays of capture and playback tracks 2016-08-08 07:51:26 -04:00
James Crook
0a16141ee5 Flag PortAudio and PortMixer unhandled error returns. 2016-07-10 21:40:49 +01:00
James Crook
18eb2bbc7a Bug 193 - Audacity can't record at > 16-bit under MME or Windows DirectSound
Fix by Uwe and Carsten of DirectSound issue (only).  We can't interrogate for formats, so we use userData to tell PortAudio what the format should be.  I have a 16 bit built in sound device and that continues to function correctly at 16 bit with 24 bit requested.  Unable to test on a 24 bit device.
2016-07-05 11:56:04 +01:00
Paul Licameli
2361121b80 Bug860, edge case: when loop-playing < 1 sample interval, don't hang 2016-06-29 13:06:01 -04:00
Paul Licameli
7d0517a9c9 Don't busy-wait (excess CPU usage) after stopping scrub 2016-06-03 08:34:39 -04:00
Paul Licameli
35b0502ce1 Don't let seek make a stutter at less than unit speed 2016-05-28 12:11:26 -04:00
Paul Licameli
a9a404c7cf Further simplified argument passing 2016-05-28 12:02:16 -04:00
Paul Licameli
9a256d3790 Don't let the consumers discard too much from the scrub queue...
Producer adds silences when needed, so that the accounting in Transformer()
is correct
2016-05-28 11:59:22 -04:00
Paul Licameli
b6764d1bf7 Reduce scrub lag yet more, at expense of possible skips in play...
by discarding work from the queue sometimes on the consumer side.

Also more careful mixed long - double arithmetic.
2016-05-28 11:59:14 -04:00
Paul Licameli
57fb3cd12c Scrub lag: lock mutex not more than once per call to FillBuffers 2016-05-28 08:44:25 -04:00
Paul Licameli
b14fa507c9 Reorganize logic of initializing queue entries 2016-05-28 08:44:25 -04:00
Paul Licameli
c585bb16fb Move bounding times and minimum stutter length into ScrubOptions 2016-05-22 15:27:35 -04:00
Paul Licameli
ffe596c760 Move some fields into ScrubbingOptions 2016-05-22 15:27:35 -04:00
Paul Licameli
671f60492d Move some static functions into ScrubbingOptions 2016-05-22 15:27:35 -04:00
Paul Licameli
3dcf802bdc Have just one scrub enqueueing function: use options for distinctions 2016-05-22 15:27:35 -04:00
Paul Licameli
cdbdd6480b Define and pass around struct ScrubbingOptions, but nothing in it yet 2016-05-22 15:27:35 -04:00
Paul Licameli
36e5b4fbbc AudioIOStartStreamOptions includes the sample rate 2016-05-22 15:27:35 -04:00
Paul Licameli
aa9afb073e Show Actual Rate in status only if playing, recording, or monitoring 2016-05-22 10:44:18 -04:00
Paul Licameli
465b743fd3 Bug1365: Do not confuse Linux key event handling...
... So click on QP during scrub had to be implemented without relying on
SafeYield() when stopping play.
2016-05-18 10:08:46 -04:00
Paul Licameli
9535dce82c Fix deadlocks in scrubbing, again, and better...
see eac6f98cbf97d9cdb240da978581ce21ec0d6f9c
2016-05-16 21:03:04 -04:00
Paul Licameli
eac6f98cbf Avoid deadlocks that sometimes happened when starting a scrub...
... as a consequence of commit 52910f4f07d41904e5f8cc5fdc5e7f8484468a00
2016-05-16 18:20:43 -04:00
Paul Licameli
8247e87dbf Allow scrub timer interval to be 1 ms, without bogus out-of-memory warnings. 2016-05-15 16:18:00 -04:00
Paul Licameli
52910f4f07 Less scrub lag: don't poll for available data, get woken up directly 2016-05-15 16:18:00 -04:00
Paul Licameli
19ef2f6681 Implement drag-scrub, compatibly with the existing move-scrub...
... Start scrub by click or double click on the scrub head; release button or
not; then move.

If you release before moving, you get scrubbing as before, controlled by
motion.  Click or drag to switch in and out of seeking.  Stop with ESC,
spacebar, etc.  No change of selection.

But now if you drag, then scrubbing contines until you release the mouse or
otherwise stop with a key.

If by release of the mouse, then the selection changes as if by a click at
the last play position.  If you hold shift, then, as if by shift-click.

If drag begins with a double-click, then the play head remains centered and
the track moves.
2016-05-10 09:37:10 -04:00
Paul Licameli
a332d3cba0 Left click in quick play area during scrubbing stops scrub, starts quick play. 2016-05-02 21:33:41 -04:00
Paul Licameli
eb6e093912 Pass arrays by reference into AudioIO::StartStream 2016-04-09 15:14:07 -04:00
Paul Licameli
b28ec2957a Make EXPERIMENTAL_MIDI_OUT compilable, but it doesn't link 2016-04-09 15:10:05 -04:00
Paul Licameli
43790cfa56 std::vector for wave track pointers; remove deprecated TrackList function; ...
... and some more uses of const
2016-03-01 20:54:48 -05:00
Paul Licameli
60bcd7aea2 Fix warnings for unused variables and functions 2016-02-26 14:56:26 -05:00
Paul Licameli
e3e10f1fc1 A few changes not using Maybe 2016-02-25 20:18:30 -05:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Paul Licameli
9bf098c7d9 Sweep unnecessary wxString copies: rest 2016-02-23 02:15:56 -05:00
Paul Licameli
7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
Paul Licameli
56e7653343 "delete"->"DELETE" in comments, easier to find remaining naked operator delete 2016-02-14 18:50:45 -05:00
Paul Licameli
5f76da4f5b Bug1321 (partial): Don't change output balance when closing Preferences unless...
... you really changed Device preferences.
2016-02-11 12:04:12 -05:00
Paul Licameli
321d5259a2 More uses of SampleBuffer, eliminating explicit DeleteSamples calls 2016-02-01 10:16:00 -05:00
Paul Licameli
508286661a Bug1104: If one stereo channel is shorter, don't buzz or stop playback short...
... A better fix this time!
2016-01-31 15:42:23 -05:00
Paul Licameli
fd2e36b538 Revert "Bug1104: When one stereo channel is shorter, don't stop playback at its end."
This reverts commit 0b5e35003fd921d5a1788d85b2909da94a4acaf4.
2016-01-31 15:26:44 -05:00
Paul Licameli
0b5e35003f Bug1104: When one stereo channel is shorter, don't stop playback at its end. 2016-01-31 15:19:47 -05:00
Leland Lucius
49fc3336eb Temporary fix for bug #964 2015-09-04 01:24:28 -05:00
Paul Licameli
1278b9644a Uniform naming of symbols in Experimental.h 2015-08-31 17:55:56 -04:00
Leland Lucius
133c0ec61d Fix for bug #1159 2015-08-26 00:13:14 -05:00
Paul Licameli
9d6fb54806 Bug1101: crash clicking on recording meter 2015-07-29 18:11:44 -04:00
Paul Licameli
fdf0759301 Bug1075, and define and use new event type for TrackPanel timer ticks...
... Thus allowing TrackPanel.cpp to work without including Lyrics headers.
Also eliminates some of its direct notification of MixerBoard.
2015-07-28 11:56:00 -04:00