Commit Graph

283 Commits

Author SHA1 Message Date
Paul Licameli 48a5f55179 More const qualifiers, for copying of tracks, and replacing in lists of tracks
... (the tracks may be const, not the list, when replacing)
2016-02-27 17:30:30 -05:00
Paul Licameli 6f63226291 More const qualifiers and mutable members for drawing of tracks 2016-02-27 13:04:34 -05:00
Paul Licameli d097c7fad4 More const qualifications. The source of a paste is const. 2016-02-27 12:54:57 -05:00
Paul Licameli 70c1d57591 More const qualifications, and mutables, for functions that draw tracks...
... The display related  members that had to become mutable are probably
ones that don't belong in the track classes, ultimately.
2016-02-27 12:35:17 -05:00
Paul Licameli 05f5375e4a Use std::vector for wave track locations 2016-02-27 12:08:03 -05:00
Paul Licameli 60bcd7aea2 Fix warnings for unused variables and functions 2016-02-26 14:56:26 -05:00
Paul Licameli 4a6fd96a97 Commented out some unused functions 2016-02-26 12:35:30 -05:00
Paul Licameli a5b6c9fd8f Add some const qualifiers; define TrackListConstIterator 2016-02-24 19:10:39 -05:00
Paul Licameli 9bf098c7d9 Sweep unnecessary wxString copies: rest 2016-02-23 02:15:56 -05:00
Paul Licameli dbaa811577 Stack-allocate where possible! ...
... Removed many unnecessary naked news and deletes.
2016-02-17 18:15:57 -05:00
Paul Licameli 7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
Paul Licameli 56e7653343 "delete"->"DELETE" in comments, easier to find remaining naked operator delete 2016-02-14 18:50:45 -05:00
Paul Licameli 507cee7ee5 One less indirection accessing Region 2016-02-02 11:49:53 -05:00
Paul Licameli d70ff3337d Bug501: Improve time-shift of clips between tracks...
... When you click in a stereo clip, move the correct partner clip with it.

When you click in the selection and it spans clips, move all clips containing
any part of the selection.  (As horizontal dragging does.)  Even if these are
not all within the same stereo track.

I implemented this rule:  If any clip moves up (or down) by n audio tracks
(not counting the label tracks), all clips must move the same number, and
all must move from mono to mono or left to left or right to right.  If that
is not possible, no move happens.
2016-01-24 23:08:10 -05:00
Paul Licameli e9479e6c26 Bug671: Really fixed by the fix for bug389, but this is some extra safety. 2016-01-23 20:31:11 -05:00
Steve Daulton 8a6edf3623 Add custom track name defaults to preferences 2016-01-21 02:42:25 +00:00
Paul Licameli b84c1b322e Bug1169: end the separate treatment of lin vs. log display bounds for spectrum...
... also make WaveTrack responsible for storing and validating the bounds
... also let the bounds vary per-track even though other settings are default
... also change some code names to mention "period" not "undertone"
2015-09-06 21:47:14 -04:00
Paul Licameli 9c483e2e86 Add (redundant) #include "Experimental.h" in all .cpp files using the symbols 2015-08-31 17:56:10 -04:00
Paul Licameli 80d7ed36f0 Bug1162: Be careful remapping db scale extremes, when the db limit value changes 2015-08-27 16:06:13 -04:00
Paul Licameli 555aa14e9e Bug1160: Fix scale limits in waveform views 2015-08-26 07:24:20 -04:00
Paul Licameli b11f57a643 Fix bugs in retraction of Waveforms preferences page 2015-08-19 11:52:31 -04:00
Paul Licameli 4a704af03f Restore Waveform (dB) to Tracks preferences for default view mode 2015-08-19 10:21:09 -04:00
Leland Lucius 37168ebbf6 Merge remote-tracking branch 'upstream/master' into wx3 2015-07-28 15:06:25 -05:00
Paul Licameli 51d7b3670c Remove LabelTrack.h from other headers 2015-07-28 10:02:07 -04:00
Paul Licameli d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04:00
Paul Licameli 5abbd463b2 Waveform dB is not a track type. Logarithmic is a Wavetrack scale type...
... Also removed one line from the track control drop-down, and changed
accelerators to more mnemonic choices.

Also the open page of View Settings... determines track view type after OK
2015-07-28 08:08:13 -04:00
Paul Licameli 0c4418af22 Boilerplate for empty waveform preferences, analogous to Spectra 2015-07-28 08:08:10 -04:00
Paul Licameli adb4a534e8 Pitch is no longer a special view type... && bug fixes 1040, 1041
... It is a choice of algorithm in spectrogram settings, and any frequency
scale may be chosen with it.  Spectral selection works in it.
2015-07-27 23:01:20 -04:00
Paul Licameli f74713f020 WaveTrack::WaveTrackDisplay does not encode scale or spectral selection...
... SpectrogramSettings does that instead, and Preferences or View Settings
are the user interface for changing it.

Handle invalidation of spectrogram pixel cache for scale type changes,
just as for other changes of settings.  No more
TrackArtist::InvalidateSpectrumCache().

View type of track now switches to Spectrum when applying or OKing the
View Settings... dialog and the Spectrogram page is open (and for now
it is still the only page)
2015-07-27 23:01:04 -04:00
Paul Licameli 1dffeace93 Access SpectrogramSettings via WaveTrack, which may be nondefault (no UI yet)...
... and add accessors to SpectrogramSettings, and remove TrackArtist functions
for getting and setting the globals.
2015-07-26 21:10:16 -04:00
Leland Lucius 9b9c8cc073 Round 5 of wx3 changes
FileDialog now complete on Linux.  Needs some fine tuning on
Windows and OSX.
Builds with wx3 and gtk2 or gtk3.
Still more effect work to do.
2015-07-14 23:33:53 -05:00
Paul Licameli ccebaf9d95 Bugs 1043, 1044 -- Be careful with new display modes in preferences
Write a new key so version 2.1.0 isn't confused by the reordered values

Add some future proofing against similar to 2.1.1 code
2015-06-23 13:12:07 -04:00
Leland Lucius de1fe0ae37 Fix for bug #1034 2015-06-15 23:38:02 -05:00
Paul-Licameli 1992b0c7e3 Fix a compilation warning, make some member functions const 2015-05-29 00:35:00 -04:00
Paul-Licameli bdc2839112 Preliminaries for bug 900
Create WaveTrackCache as a utility class but don't use it anywhere yet.

The possible minor performance problem with effects is fixed by changes
in WaveTrack::GetBestBlockSize().
2015-05-26 20:02:37 -04:00
Leland Lucius 3e1fbcd5ec Additional autosave speed improvement and 1 fix
This changes the autosave XML file to a binary representation
during writing to speed up autosave processing.  A lot of the
time used during autosave is a result of having to convert and
print all of the values to the XML file.

Writing the same information, but in binary format, reduces
all of that to just the bare essentials and the actual write
I/O.

During recovery, the binary file is read and converted to
the real xML representation and processing happens as it
did before.

It is a noticeable difference with very long or many tracks.

The included fix has to do with append recording.

Say you have 3 tracks and you want to append recorded audio
to the middle track.  Sometime later Audacity crashes and
upon recovery, the recorded audio is actually appended to
the third track, not the second one.

This fixes that by adding an "autosaveid" to each track as
it is written to the autosave file.  The same ID is written
to the recording recovery appends to the autosave file.

Then, during recovery, the IDs are matched up and the audio
gets appended to the proper track.

These autosaveid attributes are only present in the autosave
file and not in saved project files.
2015-04-17 16:58:26 -05:00
Paul-Licameli e26ab98e0e Bug 828 (partial) - Don't divide by zero in Contrast dialog 2015-04-09 19:21:39 -04:00
Paul-Licameli 0a69283a7e Fix linux compilation 2015-04-08 12:15:30 -04:00
Paul-Licameli d37a730f56 Bug822 - memory leak and orphans when paste eliminates cutlines 2015-04-08 09:37:46 -04:00
v.audacity@gmail.com 7e96305991 Get rid of an unused var to avoid compiler warning. 2015-02-19 11:17:40 +00:00
v.audacity 5f1ce03e32 PRL's fix for bug 827 2015-02-19 11:08:58 +00:00
lllucius b9647586af Committing patch from bug #794 2015-01-04 19:44:54 +00:00
lllucius 65088dc4d2 Make sure the envelope buffer is completely set
This should correct at least one of the situations where
folks have complained about crackling when the first clip
of the first track does not start at zero.
2014-12-22 05:03:08 +00:00
v.audacity 72b6de9edf Removed some debugging cruft. 2014-11-22 03:56:21 +00:00
benjamin.drung@gmail.com 277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
lllucius@gmail.com d50f893864 Fixes some minor issues reported by valgrind. 2014-05-27 02:02:59 +00:00
martynshaw99 3d64971e90 Steve 'the Fiddle' Daulton's fix for a little bug I wrote about 6 years ago. Thanks Steve! 2014-05-13 23:36:39 +00:00
martynshaw99 3acbb825a0 Andrew Hallendorff's changes to make the vertical ruler follow the zoom level in both linear and dB modes. 2014-02-19 01:00:32 +00:00
v.audacity 945b27fea0 Remove unnecessary wxASSERT because the condition is checked for, in Release build as well. 2013-10-17 23:18:04 +00:00
martynshaw99 4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
james.k.crook@gmail.com fe3e0b7699 Fixed bug (ASSERT) when adding a click track after adding a chirp (and unselecting) when sync-lock is enabled. 2013-09-18 20:55:04 +00:00
james.k.crook@gmail.com dba81b3f1c Cleanup: Fixed lots of trivial MSVC warnings. 2013-08-25 21:51:26 +00:00
v.audacity c7daafede2 In off-list discussion, Steve mentioned that kdevelop / kate highlighting recognizes "FIXME", but not "FIX-ME", which has been the Audacity convention. This commit changes Audacity code to use the "FIXME" convention (though I've never known it as convention and MSVC doesn't recognize it).
Also, minor change in WaveTrack.cpp in the effort on bug 641. Should have no functional difference.
2013-08-24 20:30:47 +00:00
v.audacity 019ec26ddf updated comment 2013-07-22 03:47:24 +00:00
v.audacity 0726da24f2 fix for P2 http://bugzilla.audacityteam.org/show_bug.cgi?id=641, I hope 2013-07-18 04:18:59 +00:00
martynshaw99 f209391d59 John (Thales) code to make the waveform display look like the output of the gain and pan sliders, rather than the input. Added as EXPERIMENTAL_OUTPUT_DISPLAY since there is work to do, but I think this deserves wider input/views. 2013-05-30 23:14:25 +00:00
richardash1981 4fc80dd526 When merging tracks, copy the gain and pan as well as the display format, and all are common to both tracks 2013-03-10 16:57:27 +00:00
v.audacity 29f1325c75 Fix bug 331 (P3). 2012-08-03 22:59:25 +00:00
v.audacity 94cc0f19ff Fix bug 559 (P1), http://bugzilla.audacityteam.org/show_bug.cgi?id=559. 2012-07-24 22:21:46 +00:00
v.audacity 644d0b5355 more detail in comment 2012-07-22 02:39:54 +00:00
v.audacity a7a6c2b557 See http://bugzilla.audacityteam.org/show_bug.cgi?id=528#c11 (P2). 2012-07-20 03:31:10 +00:00
v.audacity 002b25991d bug 528 (http://bugzilla.audacityteam.org/show_bug.cgi?id=528, P2)
modified version of Martyn's patch
2012-07-11 04:09:45 +00:00
martynshaw99 68e2d00f9b Restore default behaviour if no clips found to pre-r11704 status, whilst still get proper max and min for severely-offset waveforms. 2012-05-02 21:37:45 +00:00
martynshaw99 09b003c056 Missing header, sorry. 2012-04-24 22:44:55 +00:00
martynshaw99 ffea5a2273 Addressing one of the problems reported with 'Normalise' if the offset is greater than the signal. Comments on other possible problems. 2012-04-23 23:39:36 +00:00
james.k.crook@gmail.com 2f0323c8fd Fix Bug 183: Zero crossing detection previously could/would select samples that were in the spaces between audio. This led to selection of audio before time zero. It also led to poor behaviour where clips did not end at zero. Now spaces between audio are strongly discouraged (treated as samples of value 2.0) for zero detection. 2012-03-25 16:19:08 +00:00
v.audacity e47349a6f4 Further fix for P2 bug described by Bill Wharrie in "Problem dragging clips between tracks with different sample rates" thread on audacity-quality. Moved the resampling of dragged clips to (left-)mouse-up, rather than upon drag into the destination, but still dragging. 2012-03-03 20:20:06 +00:00
v.audacity 111278c61b In WaveTrack.*:
* Fix P2 bug described by Bill Wharrie in "Problem dragging clips between tracks with different sample rates" thread on audacity-quality. Made sure the clips get resampled to the destination WaveTrack rate, and marked changed.

* Comment out unused override of WaveTrack::MoveClipToTrack().

* Added an ANSWER-ME about what appears to be a useless declaration and assignment.


In WaveClip.cpp, remove wxASSERT that Michael was trying to convince me to do yesterday. In debugging this, found a case when it's not a bad call. Thanks, Michael! :-)

In TrackPanel.cpp, removed some cruft.
2012-03-03 01:34:14 +00:00
james.k.crook@gmail.com 21d55e77e6 Dealt with (and tested) some FIX-MEs and ANSWER-MEs. 2011-11-25 21:26:01 +00:00
v.audacity 458152070e Fix some problems with asserts in 11308. Further wording corrections. 2011-11-18 03:47:43 +00:00
v.audacity e275189f1e Fix memory leak I introduced in r11308. 2011-11-18 01:04:57 +00:00
v.audacity 59db8d4ad4 See http://bugzilla.audacityteam.org/show_bug.cgi?id=451#c31 and http://bugzilla.audacityteam.org/show_bug.cgi?id=451#c32. 2011-11-16 05:59:48 +00:00
mchinen 927c34e5e2 Bug 390 (P4) - fix for detaching at silences when silence is a clip creates spurious single-sample clip 2011-06-01 17:11:42 +00:00
mchinen 9321b1634e Bug 377 (P2) - fix case where the R channel of a stereo clip wouldn't be dragged if it was off-screen and sync-lock was off 2011-04-25 18:10:32 +00:00
lllucius 4ef4adb6eb Fix build when wxWidgets is built to use STL as it is on openSUSE. 2011-04-17 03:42:35 +00:00
v.audacity 0bd3f11f41 Make "FIXME" comments be "FIX-ME" for consistency with themselves and "ANSWER-ME" comments, in case somebody ever wants to search for these things... ;-) 2011-03-26 01:11:51 +00:00
v.audacity 209a2b193d Consolidate multiple names for the same feature: sticky/linked/sync/synchro/grouped -> sync-lock. 2010-08-11 22:47:26 +00:00
v.audacity c7826bcdf9 Correct some comments.
Rename method for consistency.
2010-08-08 00:26:07 +00:00
BusinessmanProgrammerSteve fad5cd7f96 Fix problem generating over beginning of clips with "editClipsCanMove" mode
off; make WaveTrack::IsEmpty() use the clip boundary routines; hopefully make
warping more correct.
2010-04-15 21:01:50 +00:00
businessmanprogrammersteve e35e019e17 Change lots of code that uses linking to use the new
scheme.
2010-02-16 20:50:38 +00:00
james.k.crook 8fbe4f7185 Do not fill buffer if bufferLen is zero. This avoids a false +ve assert downstream when checking for non-existent buffers. 2010-02-12 16:10:22 +00:00
businessmanprogrammersteve 8704db3f63 Avoid rounding problem in HandleClear() 2010-02-10 18:55:45 +00:00
ra e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00