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

519 Commits

Author SHA1 Message Date
James Crook
9357c90b43 Bug 1859 - Macros on files - Save Project causes overwrites. thus loses data
AudacityProject::Save() is now batch mode sensitive, and if in batch mode (and not overwriting) will save without prompting.
The loop for applying macros to multiple files now also clears down the project, using the new function ResetProjectToEmpty().
2018-08-05 21:34:24 +01:00
Paul Licameli
ff98ca5a32 CellularPanel saves and restores focus for each click-drag-release...
... while the project makes note of which window has temporarily given up the
focus; and TrackPanel can detect that, so that the yellow border of the focused
track is still drawn while the panel "lends" the focus.

Why do all this?  So that, when the ruler is another CellularPanel, ESC key
will work to abort drags in the ruler, but TrackPanel appearance won't change
during the drags.
2018-08-05 14:51:58 -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
David Bailes
b54f56fba0 Bug 1879 - Audacity resets project rate without warning.
These were the steps to reproduce:

Remember that the Realtek card in my new HP laptop *only* runs at 48000

1) Clear out the entire Audacity config/settings folder for virgin running
2) Launch Audacity  audacity-2.3.0-alpha-20-a22be24ae3a224c90688504f8ff323c41f8c9c35
3) set recording for WASAPI/loopback (or WASAPI/mic)
4) press Record
5) Track records properly
6) rate shown in TCP is 44100
7) Project rate at bottom left shows 44100
8) Exit Audacity

9) Relaunch Audacity
10) Project rate at bottom left now shows 48000
11) Press Record
12) Track records OK - but at 48000 obviously

The problem: the default sample rate is read in like this:
gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"), &mRate, AudioIO::GetOptimalSupportedSampleRate());

- the default is not fixed, it can vary with host/device.

Fix: Ensure that there is always an entry for the default sample rate in audacity.cfg
2018-06-07 14:42:39 +01:00
Steve Daulton
32212d7fcd Dissallow OD loading for lossless copy projects
Opening a backup copy project converts to a normal project. We copy in
the dependencies when we convert to ensure that the project remains
complete and self contained (which is not guaranteed with OD loading).
2018-05-15 20:29:51 +01:00
Steve Daulton
419ecd411d Save lossless copy of project 2018-05-14 21:09:07 +01:00
Steve Daulton
30f1fa58a1 Disallow copy of project to overwrite 2018-05-13 18:27:08 +01:00
Steve Daulton
87439b5761 Prompt before overwriting another project 2018-05-11 21:36:10 +01:00
Paul Licameli
a9e7a7e5d5 movable_ptr(_with_deleter) -> std::unique_ptr 2018-05-10 00:56:37 -04:00
Paul Licameli
b8a8712ba0 make_movable -> std::make_unique 2018-05-10 00:56:36 -04:00
David Bailes
f9ee3cdc45 Fix some of the accessibility names that disappeared with the move to WX 3.1.1
The main change in wxWidgets for the setting of accessibility names is:
7dab555f71 (diff-04f5191d86f95b1c4d5d9c979da65878)

Before this change, with wxUSE_ACCESSIBILITY set to 1, for wxWindow and all the classes derived from it, wxWidgets automatically created accessible objects to handle accessibility itself. Because the way wxWindowAccessible::GetName() was written, the accessibility names of lots of windows and controls had to be set using SetName().

After the change, by default, the accessibility of instances of these classes is handled by Windows. Where the accessibility of a control is handled by Windows, then the accessibility name is automatically set to so the appropriate value. However, an accessible can still be set using SetAccessible() then wxWidgets handles the accessibility for this object.

So for many controls we can just leave Windows to set the accessibility name. However, for controls which don't have any visible labels, or where we want to accessibility name to different from the visible text, then we have to set an accessible object for that control, and then call SetName(). The Class WindowAccessible can be used for this purpose. And for custom widgets, like the TrackPanel, and the NumericTextCtrl, SetAccessible() still has to be called, since they need bespoke accessible objects

So in the cases where we want the accessible name to be different from normal, we now need to explicitly set an accessible object. (Before, this wasn't needed, as accessible objects were automatically created.).

Some notes of the fixes included in this commit:
1. The fixes cover the main window, preferences, and built-in effects. Other fixes will follow.

2. In ShuttleGui, I've set accessible objects for wxTextCtrls and wxSliders. So all of these widgets still need the name set. This was done because there are a lot of instances where these controls need non standard accessibility names, and so it saves having to put lots of SetAccessibles throughout the code.

3. For wxPanel, Windows picks up the accessibility name from the label, and so SetLabel() can be used instead of SetName(). This is just as well, since for windows that contain other windows or controls, setting WindowAccessible as the accessibility object breaks the accessibility tree.

Note that at some stage a lot of calls to SetName() can be removed from the code as they are no longer needed, but it might be better to leave them there for the moment, just in case they are unexpectedly needed.
2018-04-06 17:24:40 +01:00
James Crook
67f7ca7d0a Bug 1731 - No help button in "Error: not well formed Invalid token at line (x) [Residual]
With this change, help now goes to a specific sub-page for this error, rather than to the generic top level page.
2018-04-04 16:48:21 +01:00
James Crook
4ae394ff5e Fix some warnings (MSVC) 2018-03-31 19:47:16 +01:00
Paul Licameli
0fb02a8024 IdentInterfaceSymbol in NumericTextCtrl; don't persist translated 2018-03-28 14:00:17 -04:00
James Crook
afe09bb172 Bug 1731 - No help button in "Error: not well formed Iinvalid token at line (x) 2018-03-25 21:41:57 +01:00
Paul Licameli
2ea5741e2e Redo format setting choices in Quality preferences 2018-03-25 14:46:53 -04:00
Paul Licameli
293f22db37 Redo zoom setting choices in Tracks preferences 2018-03-25 14:39:45 -04:00
James Crook
a13be4bea3 Bug 1612 - Zoom factor lost
Zoom to fit on recovery of a project.
2018-03-24 15:08:22 +00:00
James Crook
2da227a714 Make zoom toggle finer grained
- Upgraders using zoom toggle will need to reselect the zoom levels they want.
2018-03-16 10:27:04 +00:00
andheh
3958347bef fixed a "unused variable" warning in src/Project.cpp
... and made pointer semantics more visible
2018-03-06 21:30:35 +00:00
andheh
f601cacb8c fixed a initialization order warnings in src/Project.cpp 2018-03-06 21:29:52 +00:00
James Crook
6509947de8 Fix some MSVC warnings. 2018-03-02 12:04:37 +00:00
Steve Daulton
cf9ab70406 bug 1741 Update target of audio import help button 2018-02-26 13:09:38 +00:00
James Crook
f7fe295651 Make Message command into an AudacityCommand. 2018-02-24 14:20:27 -05:00
James Crook
b1b1a362ed Doxygen, Clips and Labels
- Classes renamed and better doxygenated
- GetInfo: Type=Clips added
- GetInfo: Type=Labels added.
2018-02-24 14:20:24 -05:00
James Crook
b83b862b3f OldStyleCommandType - It's on the way out.
This renaming makes it clearer which code is still using Dan Horgan's Command system.
2018-02-24 14:20:23 -05:00
James Crook
1c988b4e3a Automation: AudacityCommand
This is a squash of 50 commits.

This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class.  AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.

- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
   - Tested with Zoom Toggle.

- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.

We abuse EffectsManager.  It handles both Effects and
AudacityCommands now.  In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.

- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.

This way we can search for related types at the same time.

- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason.  They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.

- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
  which are now better handled by other commands.

- JSONify "GetInfo: Commands" output, i.e. commas in the right places.

- General work on better Doxygen.
    - Lyrics -> LyricsPanel
    - Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
  previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
2018-02-24 14:20:22 -05:00
James Crook
636e137ee8
Merge pull request #257 from Polynomial-C/no_midi
Fix --without-midi build
2018-02-22 17:26:56 +00:00
Paul Licameli
080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli
2fbe04eda0 Replace more Connect with Bind; needed redeclaration of custom events 2018-02-21 19:30:40 -05:00
Paul Licameli
bf5228267a Calls to Disconnect or Unbind in destructors are not needed, if...
... it's either the source of the connection that is being destroyed, or other
object (such as an ancestor window) transitively owning it and so causing it to
be destroyed too;

or, the sink is being destroyed, and that sink is a wxEvtHandler (which is
always so for Disconnect, though not for Unbind in case Bind was passed a
member function of a non-wxEvtHandler).

wxWidgets takes care of erasing the connection in such cases.

This removes most calls to Disconnect and Unbind.  Many destructors shrank to
nothing.

Notably, in case of popup menu handling, the call to Disconnect is not removable
because the object being destroyed is neither the source nor the sink.
2018-02-21 19:28:06 -05:00
Paul Licameli
28eeca5fa7 Iterate over the pending tracks for drawing and sizing the scrollbars 2018-02-21 19:20:58 -05:00
Paul Licameli
fa0fb7d8e5 Disable Undo and Redo while there are pending changes in TrackList...
... But perhaps we are developing the means to relax even this ban safely.

For instance, why not undo a mistaken AddLabelPlaying command (Ctrl+M) without
stopping the recording?
2018-02-21 19:20:57 -05:00
Paul Licameli
33cfd92c0a Define TrackId to identify tracks across undo states 2018-02-21 19:20:56 -05:00
Paul Licameli
57ce726a25 Rename Meter as MeterPanel, and some DOxygen 2018-02-21 17:50:28 -05:00
Paul Licameli
ee4f35f288 Rename Lyrics as LyricsPanel, and some DOxygen 2018-02-21 17:32:08 -05:00
Matt Whitlock
e1f0e974d0
Fix --without-midi build
See downstream bug: https://bugs.gentoo.org/637110
2018-02-21 12:19:19 +01:00
Paul Licameli
81b22a2b2b Reimplement the insertion of zeroes at drop-outs...
... and correct for latency only when there is at least one playback track
2018-01-17 12:56:35 -05:00
Paul Licameli
8077c1db04 Change the text of the checkmark for the dropout warning 2018-01-17 10:18:49 -05:00
Paul Licameli
b0cb3868c3 Make a label track named "Dropouts" not "Errors" 2018-01-17 09:35:14 -05:00
Paul Licameli
c2ee1380da Don't indent lines in the dropout warning 2018-01-17 09:21:07 -05:00
Paul Licameli
54553b82b7 Fix things that confused xgettext 2018-01-16 21:45:10 -05:00
Paul Licameli
059e186db6 Treat save-as of a file to its own path as a simple save 2018-01-16 20:05:54 -05:00
Paul Licameli
133bbd927d We can simplify logic further 2018-01-16 20:05:52 -05:00
Paul Licameli
d37c319923 Fewer uses of DirManager::GetProjectName() 2018-01-16 20:05:48 -05:00
Paul Licameli
4d364ee7f3 Remove overwrite argument -- it's always !fromSaveAs 2018-01-16 17:34:27 -05:00
Paul Licameli
1d9b8b7bad Undo confusing tangle of Save and SaveAs each calling the other...
Now Save may call SaveAs, which does not call back; each calls DoSave.
2018-01-16 17:28:43 -05:00
Paul Licameli
130e55cdf5 Use WarningDialog for drop-outs, and change the wording 2018-01-16 13:56:44 -05:00
Paul Licameli
b4ee17ed82 a translation hint 2018-01-15 15:16:15 -05:00
Paul Licameli
9777d3e880 Alert user to drop-outs during recording...
1) When the program detects this, insert zeroes into the recording to keep the
other good parts synchronized.

2) When recording stops, a message box alerts the user, and a label track is
added showing the lost parts, labelled with consecutive numbers.

3) A menu item visible in alpha builds only is added to Tools, to simulate
recording errors at random times and test the reporting feature.
2018-01-15 14:48:39 -05:00