1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 08:39:46 +02:00

9022 Commits

Author SHA1 Message Date
James Crook
85c1eb4720 Fix GetInfo: Type=Labels counts channels rather than tracks. 2018-08-29 13:35:21 +01:00
James Crook
481370b7b3 Fix ASSERT opening FFmpeg Options Dialog.
Was caused by passing a non hWnd window to the ExportOptions constructor.
2018-08-29 13:25:18 +01:00
James Crook
6656506529 Update POTFILES.in, audacity.pot and .po files.
Also added script add_nyquist_to_pot.sh which adds the nyquist files.
2018-08-29 11:24:53 +01:00
James Crook
0ea4ff1395 Add internationalization hints. 2018-08-28 16:35:06 +01:00
James Crook
3da9af47ac Update .pot and .po files. 2018-08-28 15:22:39 +01:00
Paul Licameli
85f13b433f Fix Linux build... uniform initialization not implemented right in g++? 2018-08-28 07:36:39 -04:00
Paul Licameli
eae38b0676 Fix Linux build 2018-08-28 06:20:04 -04:00
James Crook
c56dd71bfb Add missing files to POTFILES.in 2018-08-27 22:11:01 +01:00
Paul Licameli
de88c98a4b Fixes for the "bounce" at start of scrub 2018-08-27 17:03:10 -04:00
Paul Licameli
9aad60d12c Make polling loop period slightly shorter than Audio thread loop...
... but we don't need to make it as precise, using steady_clock.

Do this so that the Audio thread doesn't read the same polling message twice,
halting the scrub.  It's all right that it might miss one of the messages
instead.
2018-08-27 17:02:37 -04:00
Paul Licameli
bd88a0e481 Rewrite scrub without mutex, condition variable, or message queue...
... Instead there is just a message buffer where the polling thread leaves last
observed state, not requiring each state to be processed before it is
overwritten.  The thread doing  FillBuffers is now responsible instead for the
complete interpretation of the message whenever it is reinvoked, which happens
at very regular time intervals.

In fact the separate polling thread might be eliminated, having FillBuffers
invoking the polling of the mouse directly in its own wake-ups -- unless the
platform really allows ::wxMouseState to be called safely only from the UI
thread, as appears to be the case in Linux.

Note that this complicated rewrite is accomplished incrementally in the commits
of this merge branch, not all of which leave scrubbing in a working state.
2018-08-27 17:02:36 -04:00
Paul Licameli
e4e7a814c8 FillBuffers won't quit too early priming the RingBuffer for scrub 2018-08-27 17:02:36 -04:00
Paul Licameli
ba52753ff7 Scrub options don't need starting time 2018-08-27 17:02:36 -04:00
Paul Licameli
9d17d335b7 Poller thread leaves messages, Audio interprets; a buffer not a queue 2018-08-27 16:53:16 -04:00
Paul Licameli
832bcef3a6 Postpone work from ctor of ScrubState to the first call of Update 2018-08-27 16:53:16 -04:00
Paul Licameli
a62cf53161 Make AudioThread wake-ups as uniformly spaced as we can 2018-08-27 16:53:16 -04:00
Paul Licameli
0c0cc07686 Define utility class MessageBuffer for inter-thread messages 2018-08-27 16:48:15 -04:00
Paul Licameli
976e9aeec7 Changes to the starting and stopping of scrub/seek/at-speed...
... Necessary but not sufficient for fixing the "bounce" at start of scrub, and
for simplifying thread synchronization
2018-08-27 16:45:30 -04:00
Paul Licameli
4e461f8755 Explicit scrub shut-down signal replaces the "nudge" 2018-08-27 16:41:45 -04:00
Paul Licameli
303ac9367a Start scrub polling before the PortAudio stream...
... A part, but only a part, of the fix for "bounce" at start of scrub
2018-08-27 16:41:45 -04:00
Steve Daulton
27ede251d5 Don't collapse recorded tracks when Auto-fit enabled 2018-08-27 14:45:25 +01:00
James Crook
878818a1aa Wording: "Duplex" -> "Overdub" 2018-08-27 14:23:45 +01:00
James Crook
e31fe6b242 Make AUD-DO return T or NIL as result status.
Previously it was returning 1 or NIL
2018-08-27 10:25:53 +01:00
Steve Daulton
367d15a0b0 Add a couple of helpers for parsing string
Provides a convenient function and macro, intended specifically for
parsing strings returned by (aud-do "GetInfo: ...
2018-08-26 20:07:47 +01:00
Steve Daulton
70467e1523 Enable (most) Nyquist property lists for tool scripts
The global *TRACK* variable and its properties remain unavailable for
;type tool scripts.
2018-08-26 16:47:00 +01:00
Paul Licameli
bdf1cb32fe Some simplifications and renamings related to ScrubState 2018-08-26 10:01:06 -04:00
Paul Licameli
550d514e06 Changes of names and comments relating to scrub, don't mention queue 2018-08-26 10:01:06 -04:00
Paul Licameli
4a98ba03dd Remove ScrubQueue compensation for Producer overflowing...
... which were meant to fix growth in lag between mouse movement and play head
movement.

Recent rewrites to keep RingBuffer more populated during scrub and seek should
make this unnecessary.
2018-08-26 09:59:35 -04:00
Paul Licameli
8badb0a933 Rewrite the insertion of silences into scrub, combining queue entries 2018-08-26 09:12:53 -04:00
Paul Licameli
9727968b94 move some functions 2018-08-25 20:08:10 -04:00
Paul Licameli
1bf192e5b3 Split ScrubQueue into two queues...
... One still called ScrubQueue, which should become a simple non-queuing
buffer later, communicating scrubbing instructions from the UI or poller
thread to the Audio thread.

The other, downstream of that, supplements the playback RingBuffers with
a correspondence between samples and track times, for use by the PortAudio
thread in updating the last-played position, which is in turn used by the
UI thread to update the display.

In future this queue of times may be used as the sole, general means for
PortAudio thread to update head position, not just a special case for scrubbing.
2018-08-25 20:08:09 -04:00
Paul Licameli
69435c9191 Simplify ScrubQueue to involve only two threads...
... Remove Consumer() and fields used only by it; rename Transformer() as
Consumer().

A bit less contention for the scrub queue mutex, then.
2018-08-25 20:08:09 -04:00
Paul Licameli
81a3a7d339 Use the TimeQueue to communicate play head position updates for scrubbing...
... from the Audio thread to the PortAudio thread;  the old
ScrubQueue::Consumer() function keeps only a vestigial purpose to prevent the
scrub queue from blocking.
2018-08-25 20:08:09 -04:00
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
84c8aa0fcc Fix some cases where seeking (with mouse) let RingBuffer go empty 2018-08-25 20:08:08 -04:00
Paul Licameli
b2df5e0673 Declare and allocate time value queue 2018-08-25 20:08:08 -04:00
Paul Licameli
e91918042a Don't let the ring buffer empty when seeking past end of track...
... just allow a short stutter padded with silence in that case.
2018-08-25 20:08:08 -04:00
Paul Licameli
67a9823434 split out function AdvancedTrackTime; more caution about termination 2018-08-25 20:08:08 -04:00
Paul Licameli
2806f40ab5 Don't let the RingBuffer run dry when seek-drag is very slow...
... but not stopped.  This may even make the play head back up and re-play a
little bit.
2018-08-25 20:08:08 -04:00
Paul Licameli
5cfbfd364e Set the playback RingBuffer latency appropriately for seeking 2018-08-25 20:08:07 -04:00
Paul Licameli
111d2c8673 Can specify a minimum to maintain in the playback RingBuffer...
... this may be more than the batch size used in ongoing playback.

It is expected that this larger batch size is used only once when priming
the queue before starting play.  But then FillBuffers() may attempt to
refill up to the minimum in case demand is outpacing supply.

Thus the new number defines a "yellow zone" for the queue.
2018-08-25 20:08:07 -04:00
Paul Licameli
06fe9e843e remove some casting 2018-08-25 20:08:07 -04:00
Paul Licameli
45231b8f6a Consume equal amounts from play ring buffers in each callback pass...
... which should be the whole framesPerBuffer normally.

Also rename another function used in producing the samples.
2018-08-25 20:08:07 -04:00
Paul Licameli
8a6351d9cd Guarantee cleanup of partial allocation on all error return paths...
... such as when allocating for capture channels fails after that for
playback succeeds
2018-08-25 20:08:06 -04:00
Paul Licameli
3a94acd631 Remove unnecessary variable 2018-08-25 20:08:06 -04:00
Paul Licameli
03678eccba use mRate not sampleRate 2018-08-25 20:08:06 -04:00
Paul Licameli
575e631d49 line lengths 2018-08-25 20:08:06 -04:00
Paul Licameli
8e151aba8d Split out AudioIO::AllocateBuffers 2018-08-25 20:08:05 -04:00
Paul Licameli
eeb5f1ec20 Revert "Fix the hiccup at the start of scrub or play at speed..."
(It didn't really achieve what that commit comment said)

This reverts commit 26f72b110ceb07bc837eec5450084c6f5421ebb7.
2018-08-25 19:42:12 -04:00
James Crook
d79c071d6d Change 'mouse_move' to 'move_mouse'.
Fixing a hyperlink.
2018-08-25 17:41:28 +01:00