1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-09 16:21:02 +02:00

6566 Commits

Author SHA1 Message Date
James Crook
919571e79f Bug 1950 - Pause mutes and stops head progressing, but does not 'pause' audio.
Logic changed to delay pause by one frame, if there is a need to fade out.
So we calculate whether we are already faded out, and if we are pause, otherwise delay the real pause for one frame.
2018-08-29 19:54:11 +01:00
James Crook
41959d4d54 Bug 1952 - Windows: Timer Record - debug failure msg
Now we show "11:07:29 +" for a time 100 years, 11 hours, 7 mins and 29 seconds in the future, rather than ASSERTing.
The + should probably be mentioned in the manual.  "In the countdown, times more than 24 hours ahead aren't shown fully.  A '+' sign after the time indicates that it is more than a day ahead."
2018-08-29 15:14:28 +01:00
James Crook
b5f9acefa4 Fix some warnings in AudioIO.cpp 2018-08-29 14:00:57 +01:00
David Bailes
a5e9fb9e34 Bug 1949: WASAPI playback stops before the end of the selection
Problem: When using WASAPI on Windows, the last "latency buffer length" of a selection is not played. This is a fairly nasty bug for those relying on playback when making fine adjustments to the position of the cursor, or the start or end of selection.

During playback the "latency buffer length" has no effect on the actual latency of the playback, but the playback cursor is positioned as if the "latency buffer length" did have an effect, that is, it is positioned by this amount after the audio being played.

So an obvious workaround is for the user to set the latency buffer length to zero when using WASAPI. However they then have to remember to change it if they use another audio host.

Fix: The real problem is presumably a portaudio bug, but this fix just hard codes the workaround given above. For playback, when using WASAPI, set the suggested latency to 0, regardless of user setting.
2018-08-29 13:47:32 +01:00
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
0ea4ff1395 Add internationalization hints. 2018-08-28 16:35:06 +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
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
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
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
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
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
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
b2df5e0673 Declare and allocate time value queue 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
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
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
James Crook
74d0420b96 Bug 1763 - Clicks on starting/stopping playback.
Does not fix the Loop-Play part.
2018-08-25 17:21:18 +01:00
James Crook
b91300caf0 Bug 1947 - Clicky play when dynamically changing number of playing channels
Rather than 'cut' (i.e. drop, not cut as in 'cut preview') channels immediately, we now only do so
if their last gain was already 0.0.  Instead they micro-fade out.  Later when the channels come back,
their last gain will be 0.0, so they will micro-fade in.

A comment explains that the code would be cleaner if we just computed gains, and not whether to
drop channels.
2018-08-25 13:07:45 +01:00
Steve Daulton
f296f42392 Fix misleading error message
We are testing specifically for a selection in an 'audio' track.
2018-08-25 12:41:29 +01:00
Paul Licameli
ac1017ee1d A preference checkbox for always scrubbing unpinned, does nothing yet 2018-08-24 18:12:25 -04:00
Paul Licameli
c86a46dc99 fix Mac build 2018-08-24 17:59:18 -04:00
James Crook
9012b98eca Init mOldGains
I'd neglected to do this, which can lead to unwanted noise.
2018-08-24 22:51:31 +01:00