1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-07 16:07:44 +02:00

159 Commits

Author SHA1 Message Date
Paul Licameli
dccb716f39 enum PlayMode tells whether there's cut preview; out of Project.h 2019-05-20 21:38:12 -04:00
Paul Licameli
227fb315ea Drawing sequence for overlays independent of insertion call sequence 2019-05-20 21:38:08 -04:00
Paul Licameli
6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli
08c16b6eb7 Remove wx/{html/htmlwin,fileconf,dragimag,debug,dcclient}.h from *.h 2019-03-30 10:53:22 -04:00
Paul Licameli
69962f62d3 Remove AudacityProject::GetScreenEndTime 2019-03-27 13:32:54 -04:00
Paul Licameli
0dd0a5cb5a Remove <wx/menu.h> from CommandManager.h, moving inline functions out 2019-03-23 10:56:43 -04:00
Paul Licameli
906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli
173a300427 Include nothing before Audacity.h, as comments say we should...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -04:00
Paul Licameli
5fd6965925 Use type aliases CommandID, CommandIDs...
... for identifiers of menu commands and macros, and for vectors thereof
2019-03-15 15:18:11 -04:00
Paul Licameli
06b3b42794 Remove unnecessary initializers for empty wxString 2019-03-15 15:18:11 -04:00
Steve Daulton
bc60de2ffa Disable Scrub Ruler by default 2018-11-04 21:18:29 +00:00
Paul Licameli
303553ae4e Take class AdornedRulerPanel out of src/widgets...
... It's not a utility widget like RulerPanel.  It has a lot of application
specific logic in it.
2018-10-24 15:04:41 -04:00
Paul Licameli
903b42f84a Transport Menus 2018-10-24 12:16:35 -04:00
Paul Licameli
032070a2d9 Define table for Transport menu 2018-10-21 12:16:25 -04:00
Paul Licameli
7f5e6d12b1 Only one public CommandManager fn to begin a menu and one to end...
... It knows the nesting, so it decides for itself whether to manage the menu
as main or sub-.
2018-10-20 09:40:03 -04:00
Paul Licameli
32efcd43c4 Simplify populating of Scrub menu 2018-10-20 09:21:22 -04:00
Paul Licameli
16ab48079b Don't include CommandManager.h in other headers 2018-10-18 09:25:14 -04:00
Paul Licameli
cfe7ddcf55 struct CommandManager::Options lets us fold AddCheck into AddItem 2018-10-17 13:32:39 -04:00
Paul Licameli
42aef9f3e8 Mask != flags is unusual: simplify most AddItem/AddCheck...
... and the no longer used AddCommand.

There are only four exceptions, all using NoAutoSelect in the flags and not in
the mask.
2018-10-17 13:20:58 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
James Crook
5fd95dd131 Fix C4456 Warnings.
"C4456 declaration hides previous local declaration."
These arise from repeated declarations of the same name.
2018-10-10 17:28:50 +01:00
Paul Licameli
cc74b0273f Fix return of reference to temporary object (that's bad!) ...
... This might be the reason for Linux crashes when playing-at-speed.

This was a bad thing to do with any compiler -- not to be blamed on
possible compiler bugs.

There was a warning about this in the XCode build.
2018-10-03 14:26:05 -04:00
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
Paul Licameli
f31a1a6f8e Don't halt scrub playback with display paging at high magnification 2018-09-09 13:40:10 -04:00
Paul Licameli
03def8dbaf Bug1967: scrub shouldn't be clicky...
... And this further simplifies the use of the clock.  Rely on the regularity
of spacing between calls to FillBuffers at commit a62cf53
2018-09-09 11:01:01 -04:00
Paul Licameli
a56a5be30b Replace _ with XO (won't affect generated audacity.pot) 2018-09-03 09:10:45 -04:00
Paul Licameli
af276ac4f9 Now implement scrubbing default to unpinned, see commit ac1017e...
... This was motivated by punch and roll recording:  it appears most convenient
to pin the head for recording purposes, and drag it near the right, but when
stopping and finding the splice point for the correction, it is better to
scrub unpinned.
2018-08-31 10:46:08 -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
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
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
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
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
Paul Licameli
06b5d2e945 Bug1932 followup: Times, not sample counts, in scrubbing options...
... because the correct rate is not known where options are constructed
2018-08-20 20:44:10 -04:00
James Crook
3bb48a21df Bug 1932 - (Residual) Fix stopping behavior with Play-At-Speed.
1. The rate actually used by the sound card now sets the stopping sample number.
2. The tolerance in the 'stop position' is additionally trimmed to 20 samples.
2018-08-19 10:37:43 +01:00
Paul Licameli
26f72b110c Fix the hiccup at the start of scrub or play at speed...
... We need to start the polling of mouse state before starting the audio
stream, and not "nudge" AudioThread, so that AudioThread primes the ring
buffer correctly, not inserting some silence.

This requires yields to timer events in AudioIO::StartStream.
2018-08-16 21:21:44 -04:00
James Crook
ddd1494e75 Fix crash from following NULL pointer
GetControlToolBar() can return NULL when closing windows/projects.
2018-08-09 18:29:57 +01:00
Paul Licameli
1c5e523a1e A preference governs where the pinned head goes, not always exact center 2018-08-06 21:58:42 -04:00
Paul Licameli
7cfda551dd Move scrub click handling into a UIHandle, eliminate OnMouseEvents...
... And the one-shot hack can be simplified away.
2018-08-05 17:18:25 -04:00
Paul Licameli
153eb63b3e Rest of quick play mouse handling is invoked from UIHandle...
... and ESC key aborts the drag of play region
2018-08-05 17:18:25 -04:00
Paul Licameli
aeece118e8 Rewrite the handling of quick play indicators...
... All updates of position are done in DoGetRectangle().  Ruler need only
expose one function, DrawOverlays().

Don't redraw indicators twice when dragging (hiding and showing again), making
some flicker.  Just do one update.
2018-08-04 15:35:36 -04:00
Paul Licameli
5f27ae905c Changed misleading terminology in scrubber...
... It was confusing that HasStartedScrubbing() could be true
while also not IsScrubbing()
2018-07-29 14:20:11 -04:00
Paul Licameli
98a72acfb8 Remove unnecessary moves of return values 2018-07-24 21:25:22 -04:00
Paul Licameli
e432883dec Fix deprecation warnings with wxFont, wxPen, wxBrush ctors...
... Replace some enum constants with the equivalent values from the more
special-purpose enums, as the wx header files recommend, so overloading
selects the ctors with non-int arguments.

In a full rebuild of the debug project on Mac, this reduces the count of
warnings from 264 to 274.
2018-07-23 13:21:15 -04:00
James Crook
f0637eeb85 Bug 1906 - Issues with dynamic Play-at-Speed (Play doesn't pop up)
Fixed issue 1, i.e. the play button does not pop up after play at speed completes.
2018-07-21 21:14:30 +01:00
James Crook
5caa14e4f9 Bug 1906 - Issues with dynamic Play-at-Speed (Shows as Scrubbing)
Fixed issue 2, i.e. the scrub indicator no longer appears during Play at Speed, and the status bar now says 'Playing at Speed' rather than 'Scrubbing'.
2018-07-21 19:11:08 +01:00
James Crook
f5999954c4 Fix crackle when playing at low speed. 2018-07-20 23:10:37 +01:00
James Crook
17ca54ad4b Bug 133 - Enh: Play-at-Speed slider: Change of playback speed is no longer automatic
This adds a new preference to Playback prefs, VariSpeedPlay, on by default, which makes it possible to vary the playback speed slider whilst audio is playing using play at speed.  The code uses the Scrubbing playback engine.

This code is not final, but is already useful.  Known issues:
  1- Playback does not stop and pop-up the Play at Speed button at the end of playing the selection.
  2- The scrub widget shows uselessly on the scrub ruler when in Play at Speed mode and the status bar proclaims 'Scrubbing'.
  3- At low speeds the playback is clicky, with VariSpeedPlay, even if no changes to speed are being made.

If we can't fix both 1 and 2 by 2.3.0 release time, VariSpeedPlay will be made false by default.
2018-07-20 21:43:07 +01:00
Paul Licameli
bb7b77cde0 Change expansion of XXO and pass more arguments to CommandManager 2018-03-15 23:29:27 -04:00