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

621 Commits

Author SHA1 Message Date
Paul Licameli
c68e336247 More use of std:: style members of wxString...
... replacing:

Length => length
Len => length
2019-03-10 14:44:54 -04:00
Paul Licameli
2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
James Crook
b5d4a828d1 More doxygen 2018-11-04 14:21:00 +00:00
James Crook
466e9c179e Create ComponentInterface
It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
2018-11-02 17:04:43 +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
16ab48079b Don't include CommandManager.h in other headers 2018-10-18 09:25:14 -04:00
Paul Licameli
399e2d099d Fix spelling in an enum constant name 2018-10-17 12:53:25 -04:00
Paul Licameli
a7df004a88 Don't include Project.h or ODTask.h needlessly in other header files 2018-10-16 17:36:38 -04:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
Paul Licameli
fc6570646d MenuCommandHandler is not a base class of MenuManager...
... This forces a better placement of state variables in the appropriate
classes.

In future perhaps, MenuManager should be splintered into several classes, one
for each of the main toolbar menus.
2018-10-16 13:01:22 +01:00
scootergrisen
b4f7946e9b Remove some double space 2018-10-14 10:42:01 +01:00
James Crook
7e5a716e65 Fix C4458 Warnings
C4458 is 'Declaration hides class member'
2018-10-10 19:46:25 +01:00
James Crook
657159d542 Fix C4189 and C4100 Warnings
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'

Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
Paul Licameli
beebe648fb Remove more uses of Track::SetLinked() and Track::SetChannel() 2018-10-01 13:42:36 -04:00
Paul Licameli
fee0f284fe Rewrite many iterations over tracks and channels in src/toolbars 2018-10-01 11:25:07 -04:00
Paul Licameli
9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
James Crook
9a45c02002 Bug 1983 residual - A better fix for the residual.
The previous fix did not handle the case of the mixer toolbar being smaller than its minimum size.
The new fix does, and the code is simpler.
2018-09-20 15:35:07 +01:00
James Crook
ce31c371b9 Bug 1983 residual - Width of mixer toolbar changes. 2018-09-20 14:33:19 +01:00
James Crook
f07e40a4c0 Bug 1983 - Preference updates do not preserve toolbar widths 2018-09-20 13:16:09 +01:00
Paul Licameli
a90c6c45f3 Remove redundant calls to update toolbars 2018-09-15 18:24:16 -04:00
Paul Licameli
01634938cc Fix: Undock Tools toolbar; then reset toolbars Mac...
... Used to need two resets to get the correct result, now only one.
2018-09-15 18:23:51 -04:00
Paul Licameli
fb101964df Improved algorithm for rearranging toolbars after docking one...
... A double-height bar can now insert left of two stacked single-height bars.

For instance you can un-dock the Tools toolbar from the default setup, then
drag it back, and now get the same result as you started with.
2018-09-15 18:19:18 -04:00
James Crook
cbe778adb5 Bug 1977 - Simpler rule for 'Default sample rate' and 'Project rate'.
After discussion it was felt that only using 'Default sample rate' for new projects was better.
2018-09-13 10:48:11 +01:00
James Crook
993cea506d Revised fix for Bug 1977 - Using Spectrogram Settings in TCP causes Audacity to reset Project Rate to default 44100 Hz
This revised fix:
- No longer attempts to drive "Default sample rate" from the selection toolbar.
- No longer drives 'Project rate' direct from prefs.  It's usual it comes from the project.
- Instead 'Project rate' in the project might change if 'Default sample rate' pref is updated, but ONLY if the project has no tracks.
- When 'Project rate' in the project is updated, that is now always signaled to the selection toolbar.  Previously it wasn't.
2018-09-11 15:07:25 +01:00
Paul Licameli
2063056243 Bug221 re-fixed with better exception safety: see commit 1deff18...
... in case only some tracks successfully allocate, de-allocate all before
propagating the exception.
2018-09-10 17:51:50 -04:00
James Crook
a66d7442a3 Bug 1977 - Using Spectrogram Settings in TCP causes Audacity to reset Project Rate to default 44100 Hz
The Project Rate in the Selection Toolbar and in the Preferences dialog are now the same thing.  They ALMOST were before, causing confusion, and this bug.
This means that the fancy mechanism to set 'other' rates in Preferences is moot, since the Selection Toolbar bar does not have that option.  49000 will be overridden by 48000 for example.
2018-09-10 20:23:22 +01:00
James Crook
1deff18c15 Bug 231 - Cut Preview should play all selected/sync-locked tracks, respecting Mute/Solo during preview 2018-09-10 16:57:36 +01: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
Steve Daulton
27ede251d5 Don't collapse recorded tracks when Auto-fit enabled 2018-08-27 14:45:25 +01:00
David Bailes
ecb1cbdf3a Play at speed slider: fix page up/down increments
These increments were accidentally changed by the commit: 5e10ec0def1e1b6d2f0729bcb74edd0b95ca1a34

Changed back to original values.
2018-08-20 15:08:32 +01:00
Paul Licameli
aeba34b152 Bug1930: should draw bottom channel when append-recording...
... Bug happened only when append-recording by pressing the toolbar button, not
by using a shortcut key; and the blank track did get drawn if you moused over
it or hid and showed the window.

Turns out TrackPanel::ProcessUIHandleResult did the needed update, which was
lacking otherwise.  Now TrackList::UpdatePendingTracks is called in another
place.
2018-08-12 19:28:24 -04:00
Steve Daulton
1d22ca5789 Improve error message when capture stream fails
Rather than just guessing at the cause of the error, include the actual
error string from PortAudio.
2018-08-12 19:14:56 +01:00
Pokechu22
72b71bbe08 Use fixed play speed when note tracks are present
Scrubbing doesn't support note tracks, but time tracks do support it.
2018-08-11 18:23:15 +01:00
James Crook
adb33f466e Bug 1494 - Strange Pause behaviour with seeking/scrubbing
Now instead of the (strange) Pause, we Stop.
2018-08-08 18:40:16 +01:00
James Crook
bf6b47dbb4 Bug 1918 - Left to right (LTR) language selection reverses elements that should not be reversed
This does not entirely fix LTR language support, but dramatically ameliorates the problems originally reported in bug 1918.
2018-08-08 16:33:00 +01:00
Paul Licameli
b502d88285 Better enum value name 2018-08-06 21:58:41 -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
0dddcf44cb Some uses of wxWindowRef, a weak pointer that won't become dangling 2018-08-01 22:49:37 -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
James Crook
66e203cdca Transcription Toolbar -> Play-at-Speed Toolbar 2018-07-22 18:21:38 +01:00
James Crook
1403e7fa92 Bug 1906 - Issues with dynamic Play-at-Speed (issues 5 & 6)
Now cut-preview and looped play revert to using the old fixed speed play-at-speed.
Unfortunately Scrubbing does not (yet) support looped play or cut-preview.
2018-07-22 15:55:10 +01:00
James Crook
9e1291b2b7 Improve initial and minimum widths of resizable toolbars.
In particular, device toolbar previously could be made ridiculously small.
Also in the default configuration it takes a whole line, so we now use that space in its initial size.

Mixer Toolbar initial size was a little small.  Now it matches the Transport Toolbar width.
Meter Toolbar initial size was too small.
Transcription Toolbar was a little too small.  Better to start out slightly wider than previously.
2018-07-22 15:19:51 +01:00
James Crook
85497ceefa Increase upper limits on slider widths in resizable toolbars.
Worth doing for users with wide screens, who want to use the toolbar at full screen width.
Both toolbars can now expand to a little over 2000 pixels width.
Note that the max sizes affect what is drawn.  You can make the toolbars wider still, but the sliders inside them won't continue to lengthen.
2018-07-21 17:13:08 +01:00
James Crook
8b2fa68a88 Make Mixer ToolBar resizable. 2018-07-21 16:59:33 +01:00
James Crook
132986de1a Make Transcription ToolBar resizable.
I moved 'Fit()' from ToolBars into MeterToolBar, because it is a workaround for an incorrect size calculation by MeterToolBar.  MeterToolBar is sized as if there is no resizer, so when there is one, the toolbar needs to be expanded (using Fit) to accommodate the resizer.

I also set the min size of MeterToolBar to 150, so that some meter will appear, even if Toolbar shrunk to the minimum.
2018-07-21 16:41:32 +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
James Crook
eb0e3802b1 Bug 1896 - Linux: Resizing the device toolbar judders badly 2018-07-06 14:52:33 +01:00
David Bailes
bfec6f0aa2 Spectral Selection toolbar: minor accessibility change.
Change the accessible name of the combo box from "Spectral selection" to "Show". It's less verbose, and brings it into line with the "Show" combo box in the Selection toolbar.
2018-07-05 11:44:00 +01:00
Paul Licameli
7d9c82f470 Output device should be changeable even when no input devices...
... I observed that you couldn't, with a Mac Mini connected to a monitor;
two output devices (monitor and built-in) but no input device (there is no
built in mic)
2018-07-05 01:55:09 -04:00
Paul Licameli
a72b8f98c0 Bug1883, more: fix logic for choosing start & end times of recording 2018-06-11 15:02:20 -04:00