1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-22 15:20:15 +02:00

165 Commits

Author SHA1 Message Date
Paul-Licameli
db1cb406e0 ESC key aborts resizing of mono track, stereo track, or channels of stereo track
Resizing may un-minimize a track; I was careful to be sure ESC restores
minimized state too and then that un-minimizing restores correct height
2015-04-11 23:53:34 -04:00
Paul-Licameli
82fe9a162c Refresh display after ESC aborts a drag, as James suggested.
Otherwise zoom lines did not disappear if you hit ESC while the cursor is
outside the main window.
2015-04-09 22:26:34 -04:00
James Crook
f80db283b5 Use ReleaseMouse not ReleaseCapture
Change made to fix broken build under Linux.
2015-04-09 23:43:28 +01:00
Paul-Licameli
903fcb1fc2 ESC key can abort certain dragging actions
For now, let it abort vertical scale zoom
(any mouse button in any tool, in the vertical ruler)
and horizontal zoom
(any mouse button in the zoom tool or right mouse button in the multi tool,
in the wave display)

Should any other drags be escapable too?
Time shifting?  That would need some more work to restore initial state.
2015-04-09 15:50:04 -04:00
Chris Diamand
01c346fe91 Don't capture the mouse if it's already captured.
Otherwise the following assertion gets triggered:
../src/common/wincmn.cpp(3271): assert "!wxMouseCapture::IsInCaptureStack(this)" failed in CaptureMouse(): Recapturing the mouse in the same window?

Based on the fix provided for an identical assertion triggered elsewhere,
described here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765779
2015-04-08 22:52:24 +01:00
Leland Lucius
2457579091 Bug 765 - Delays using Edit commands and Draw Tool in long projects
A 4hr track used to take about 20s to cut a few samples. This is now significantly improved, to around 3s. Leland did this by

(a) moving the size calculation to when we examine the undo history, so it isn't slowing down the edits.
(b) in size calculation, using sizes that are cached rather than going to disk to find the sizes.
(c) writing the autosave file which is to an FFIle to a string first, i.e. using XMLStringWriter as a buffer for XMLFileWriter.

Step (c) may also make autosave marginally safer, as the risk of a partially updated autosave file is reduced.
2015-04-07 12:20:50 +01:00
lllucius
7aa81bc34d Attempt to correct the size of the Set Rate dialog 2015-01-03 10:36:42 +00:00
lllucius
f5f3c5135f Make sure display refreshes after audio I/O stops
What looked simple in r13811 was not so simple apparently.
(We REALLY need a gAudioIO->IsCapturing())
2014-12-29 22:28:32 +00:00
lllucius
c305724561 Fix for bug #806
This was my bad.  I'd reset the number of capture channels
in AudioIO when the stream was stopped.  Unfortunately, two
methods depended on it being valid AFTER the stream had
stopped.

Those methods, TrackPanel::OnTimer and AudacityProjecT::OnCloseWindow,
were using it as an indicator if recording had been taking place
before they stopped the stream.  They then flushed the tracks, pushed
the state onto the undo stack and did some other post-recording tasks.

Turns out that the tracks are already flushed as part of the normal
AudioIO::StopStream processing, so that was redundant.

And, instead of duplicating the process, I've relocated most of each
methods processing to AudacityProject::OnAudioIOStopRecording.
2014-12-28 08:53:57 +00:00
lllucius
2c6401b564 Committing Paul's spectral nagivation commands patch
From:

http://audacity.238276.n2.nabble.com/Patch-spectral-peak-snapping-navigation-commands-td7565648.html
2014-12-22 08:03:41 +00:00
lllucius@gmail.com
db5118255b Fix for bug #759
See bug for more info
2014-12-14 16:01:21 +00:00
lllucius@gmail.com
bfb1284573 Fix for unwanted cursor persistence outside of project window
This seems to only happen on the Mac and has to do with
how wx2.8.12 handles cursor setting.
2014-12-12 21:56:49 +00:00
lllucius@gmail.com
d1a1c7877d Fix for bug #s 602 and 603.
When undoing not only should the capture state be checked to
see if it safe to undo, but the captured track should be
checked as well since some activities only set the captured
track and not the state.
2014-12-06 12:28:10 +00:00
lllucius
d10d2bdedc Fix for bug #756
The problem was that the mouse capture was not being reset
when the pointer left the track panel.  In that case, as
long as no buttons are down, the capture state needs to be
reset so that when the mouse re-enters the track panel it
figures out what is going on from a clean slate.
2014-12-06 10:15:18 +00:00
james.k.crook@gmail.com
c71397beae Changes to seeking and scrubbing from Paul Licameli.
These are mostly under an EXPERIMENTAL_ #ifdef.  Also has a change for the prompt string for preferences so the displayed keybinding is adjusted when in multitool mode.
2014-11-29 22:09:57 +00:00
james.k.crook@gmail.com
30500b2e85 Fix for http://bugzilla.audacityteam.org/show_bug.cgi?id=792 "Right end of selection cannot be adjusted with a mouse when left end is behind zero" by Paul Licameli. 2014-11-29 17:10:56 +00:00
james.k.crook@gmail.com
2131568876 Spectral Selection Toggle (using q key) by Paul Licameli. 2014-11-29 16:53:28 +00:00
martynshaw99
bc6583b62d Paul L's patch to remove the 'PlaybackCursor' that he introduced, along with a ststus bar message about it. Also fixes L/R cursors with a point selection. 2014-11-25 23:37:40 +00:00
stevethefiddle@gmail.com
7c3f355c7a Fix for bug 791. 2014-11-24 18:03:33 +00:00
lllucius
ad92e8c4bf One more round of effects changes.
The big thing is the common efffects UI.  Right now Ladspa and VST
have been converted to use it and Audiounits will be next.  It makes
everything nice and consistent while reducing the clutter in the
dialog.

Other goodies are:

Ladspa effects now show output controls when supplied by the effect
Ladspa effects now work fine as Analyze type effects
Ladspa now has user presets
VST effects dialog is now less cluttered...leaving more room for the effect
Ladspa and VST effects now share a common UI
Ladspa and VST effects are now usable in chains
Ladspa and VST effects now handle user presets the same way
Currently active effects settings automatically saved and reloaded
Can now do numeric range checking on input fields.

And, as always, plenty of critter squashing.
2014-11-14 03:03:17 +00:00
james.k.crook@gmail.com
1933070f0d Tweak to spectral selection behavior when one edge is tied.
Idea by Martin.  Implemtation by Paul Licameli.
2014-11-11 15:24:22 +00:00
james.k.crook@gmail.com
8a9987a0d9 From: martin@steghoefer.eu [PATCHES 02-15 of 15] Fix runtime problem with wxWidgets 3.0:
Correct string formatting for:
2/15  %d + enum => %d + int
3/15  %lld + int64_t => %lld + long long
4/15  %d + int64_t => %lld + long long
5/15  %d + double => %f + double
6/15  %d + int32_t => %d + int
7/15  %d + intptr_t => %p + void*
8/15  gint, guint
9/15  %d + long => %ld + long
10/15 %n + int => %d + int
11/15 %x + int => %x + unsigned int
12/15 %f + int => %d + int
13/15 %S + wxChar* => %s + wxChar*
14/15 %d + size_t => %d + int
15/15 %d + size_t => %lld + long long

"The functions wxString::Format, wxString::Printf (and others indirectly) have become stricter about parameter types that don't match (format specifier vs. function parameters). So the bugs (that were already present in audacity before) become visible in wx3.0 as error message dialogs. I've checked all occurrences of Printf, wxPrintf, PrintfV, Format, FormatV, wxLogDebug and wxLogError systematically and made the type match."

Note (9/15): In TrackPanel.cpp, ExportMP2.cpp and CompareAudioCommand.cpp this patch supersedes related change done in r13466 because the new solution requires fewer casts and therefore simplifies the code.

Note: Many .po files are affected, and we need to be very careful about this.  Incorrect "%d" and similar in translation files may lead to crashes in those languages (only).  This is something we should actually have been more careful about in the past.  We need to write a script to check that the "%d" and similar format specifiers match between English and translation.
2014-11-08 16:42:34 +00:00
james.k.crook@gmail.com
67d2b274e2 Frequency Selection toolbar from Paul Licameli.
Linux/Mac will need new files adding to project, SpectralSelectionBar.cpp, NumericTextCtrl.cpp.
2014-11-08 15:18:43 +00:00
james.k.crook@gmail.com
6112a2a8c1 Spectral selection cursor and mode selection changes from Paul Licameli.
This also now shows a new green 'play cursor' when ctrl is held down on wave track, and shift being held down is signalled by a cursor change to finger-pointer too.

I also accidentally enabled EXPERIMENTAL_MIDI_OUT.  We may disable that in December for release.  Leaving it in for now.
2014-11-08 14:30:19 +00:00
james.k.crook@gmail.com
f26746a5a2 Removed prompt about ESC being a toggle.
(a) Paul would like to indicate how to toggle the mode some other way.  (b) You only see the prompt if you are already in this mode.  (c) We may no longer use ESC in the future.
2014-11-02 21:57:14 +00:00
james.k.crook@gmail.com
e9ba00ff6d New behaviour for shift when moving mouse reinstated.
This addition was lost by me in a change I made to Paul's code.
2014-10-26 13:35:17 +00:00
james.k.crook@gmail.com
31fa2be749 Clean up of some spectral selection code making it shorter, clearer and easier to check.
Also added non-shift behaviour for shift and drag center line, that previously asserted.
2014-10-26 10:11:35 +00:00
james.k.crook@gmail.com
290a0107c9 Patch from Paul Licameli Improving Spectral Selection
ESC Key toggles snapping of center frequency to peaks (no visual indication of snap to yet)
Description added to mouse prefs - fix later.

Shift now required to keep top/bottom frequency pinned whilst (re)dragging the other one.

Code for status bar messages simplified and made more consistent, and no longer hard codes assumption that preferences is Ctrl-P when prompting user about it.
2014-10-25 22:05:45 +00:00
lllucius@gmail.com
1b993ccd08 Patch provided by Rob (RPM) to resolve many of the wx3 format string assertions
He wanted to help so I asked if he wanted to track them down.  He agreed and
found more than I probably would have.  And he said there were more, but the
rest were questionable and since he works on Windows, wasn't able to actually
test.

I give a few of the ones he did find a go and they do indeed get rid of the
assertions.

(Basically, a 64-bit/32-bit issue, easily resolved with a typecast.)
2014-10-19 03:08:10 +00:00
lllucius@gmail.com
97639c4620 Get rid of build OSX build errors:
/Users/yam/tl/audacity/mac/../src/TrackPanel.cpp:1746: error: '<anonymous enum>' is/uses anonymous type
/Users/yam/tl/audacity/mac/../src/TrackPanel.cpp:1746: error:   trying to instantiate 'template<class A, class B, class DIST> bool within(A, B, DIST)'
2014-10-19 02:46:44 +00:00
james.k.crook@gmail.com
a6f9f6bc58 Spectral Editing: Using subroutines to shorten code, and more comments in the code. 2014-10-18 16:01:50 +00:00
james.k.crook@gmail.com
37608c2290 Paul Licameli's Spectral Editing Patch.
This relies on three new nyquist scripts to actually do the editing.  The peak-snapping code in FrequencyWindow has been extracted into a new class, SpectrumAnalyst, to provide peak-snapping in spectrogram too.
2014-10-18 14:19:38 +00:00
lllucius
c512822138 Additional changes for wx3
These are mostly for getting it to build on Linux, but I've
also created new configs in Visual Studio to make it easier
to switch between wx2 and wx3.

For Linux, you have to tell configure where to find the wx3
version of the wx-config script and, since some distros build
wxWidgets v3 against GTK+ v3, you may also need to enable
gtk3 with something like:

./configure --enable-gtk3 WX_CONFIG=/usr/bin/wx-config-3.0

On Windows, I've added "wx3-Debug" and "wx3-Release" to the
existing "Debug" and "Release" configurations.

They depend on you having your WXWIN environment variable
pointing to your wx2 directory and a new WXWIN3 environment
variable pointing to your wx3 directory.  For instance, I
have:

WXWIN=C:\Users\yam\Documents\wxWidgets-2.8.13
WXWIN3=C:\Users\yam\Documents\wxWidgets-3.0.2

Doing this allows you to switch freely among the 4 configurations
without having to get out of Visual Studio and monkey around with
the environment.

The project files will also add the location of the wxWidgets DLLs
to the PATH when running Audacity from within Visual Studio.  They
add %WXWIN%\lib\vc_dll or %WXWIN3%\lib\vc_dll at the beginning
of the PATH variable as appropriate.

I expect that once we convert to wx3 we'll just drop back down to
the normal Debug and Release configurations, but this should make
switching between wx2 and wx3 much easier during the transition.
2014-10-16 16:18:04 +00:00
lllucius
bdcefb4850 Preliminary changes for wxWidgets 3.0.1
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX.  You can get Windows to build, but there's
still some display issues.

These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
2014-10-06 08:10:50 +00:00
james.k.crook@gmail.com
f5e593cc4c Paul L's new SelectedRegion class replacing use of t0 and t1. Also LabelTrack.h no longer in TrackPanel.h includes.
This change is believed to be a direct refactoring that does not change functionality.  It paves the way for more complex kinds of selection, such as selections involving frequency as well as time.  It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
2014-10-05 17:10:09 +00:00
james.k.crook@gmail.com
2dc9325133 Two more unneeded 'SetPlay()'s commented out for consistency. 2014-08-17 13:06:54 +00:00
lllucius
96324b5520 Add "Delete Label" to right click when editing labels. 2014-07-12 14:26:07 +00:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
v.audacity
77b56cf8bc Fix crash bug caused by bug 705 patch. 2014-03-31 00:41:16 +00:00
v.audacity
74a660ef16 Bug 705 - Envelope points not deleted correctly when button up over label track. Steve's patch. 2014-03-22 03:27:42 +00:00
james.k.crook@gmail.com
30e6a3dec4 Removed some per-file memory allocation debugging that is not needed (and generates warnings) now that we do it from AudacityHeaders.h 2014-01-13 21:21:14 +00:00
martynshaw99
65e4f56126 Norm's patch to improve selection speed on large projects by reducing the number of unnecessary auto-saves. Maybe vertical zooming should also not trigger an auto-save? 2013-12-30 00:41:18 +00:00
martynshaw99
f32e4918c0 Norm C's patch for zooming, with a few mods from me. Allows more zooming-in and gives shift-right-click to return to 'normal' zoom on platforms that support it.
I note a number of 'zooming' bugs do still exist, but are ancient.
2013-11-28 01:11:09 +00:00
v.audacity
a68955a0dd Steve's patch for http://bugzilla.audacityteam.org/show_bug.cgi?id=675, "Additional Track Drop-down Menu commands" 2013-11-03 01:17:58 +00:00
lllucius
ce00d5b507 [Bug 647] Snap-To clicks find nearest snap point, not nearest previous.
Convert SnapTo from on/off to a choice of off/nearest/prior.
2013-11-01 14:13:39 +00:00
richardash1981
9e9aba6222 Move the MakeParentPushState() calls into the event handlers, so that the implementation method can be used from other places as well in the future. Patch by Steve the Fiddle 2013-10-30 22:10:11 +00:00
RichardAsh1981@gmail.com
be4f39c9c7 refactor the construction of the track pop-down menu into a function to avoid repeating the code multiple times to do the same thing. This makes extending the track pop-down menu, and eventually breaking this class up, much easier 2013-10-30 22:07:06 +00:00
RichardAsh1981@gmail.com
88b0e0c264 more whitespace cleanup, and make blank lines not have spaces on them, patch by Steve the Fiddle 2013-10-29 21:49:45 +00:00
RichardAsh1981@gmail.com
8b24718978 fix tabs in file, patch by Steve the Fiddle 2013-10-29 21:34:59 +00:00
lllucius
3d95126e0e Bug 275 - Snap-To status/quantisation are global, leading to incorrect indications in multiple projects
This adds (I believe) project specific selection format.
2013-10-27 01:58:35 +00:00