Commit Graph

39 Commits

Author SHA1 Message Date
Paul Licameli 197ebc2994 Bug2583 residual: Re-placement of cutlines when generating sound 2021-01-25 12:06:24 -05:00
Paul Licameli c2feee6cea Bug2346: Complete fix...
... without making undesirable dependency cycles.

Eliminate calls to NewWaveTrack in effects, but in Edit>Copy too, which was
not mentioned in the bug report.  (Copying a track, deselecting all, and pasting
preserved CLIP colors, but not the TRACK color setting which applies to newly
generated clips.)

Instead, always use the new function WaveTrack::EmptyCopy from the track to be
later replaced, getting color information.

NewWaveTrack is still used in benchmark test, import, the Track menu
commands that make new tracks, recording to new tracks, and generators without
a selection, where there is no track to copy from.

Also when deserializing tracks from the .aup file, in which case the saved
color is later retrieved from the file.

Also, in mix-and-render, where other logic decides whether to copy colors
afterward.

See commit a9658e6ef7
2020-03-10 22:32:23 -04:00
Paul Licameli 046ee21e72 Move GetEditClipsCanMove to global function in TracksBehaviorsPrefs.cpp 2020-03-09 11:23:08 -04:00
Paul Licameli 6a0aed3884 Eliminate uses of GetActiveProject in src/effects 2020-01-06 14:14:21 -05:00
Paul Licameli d8c2610d88 TranslatableString in AudacityCommand::MessageBox, Effect::MessageBox 2019-12-20 21:32:47 -05:00
Paul Licameli b5a57682b6 static ViewInfo::Get() and ZoomInfo::Get()...
... not member functions of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli f86403378b Move AudacityMessageBox to its own files...
... breaking cycles among low-level files introduced by 273ba9f
2019-05-20 14:48:36 -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 4018b191b4 Remove Get/Set functions for selection bounds from AudacityProject 2019-03-27 13:32:53 -04:00
Paul Licameli bb3aa00f50 Effect::CopyInputTracks was only called with two values...
So now it simply takes a bool.
2018-10-01 11:06:31 -04:00
Paul Licameli 1be3187b99 Use TrackIterRange::Visit 2018-10-01 10:59:24 -04:00
James Crook 2d2f282c83 Bug 825 - Sync Lock behaves inconsistently when moving of clips is disabled
Sync Lock on now means clips can move.  So it 'trumps' that setting, when on.
2018-04-11 18:51:31 +01:00
Paul Licameli ccb4bbac33 Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
2018-01-01 17:50:02 -05:00
Paul Licameli 378c96fda1 Consistently use translated effect name in titles of message boxes...
... For built-in and Nyquist effects.
2018-01-01 17:50:01 -05:00
Paul Licameli 0d7250578d Other methods of WaveTrack return void, will throw on failure instead 2017-03-31 18:26:52 -04:00
Paul Licameli a4c7d37d3e Remove naked new[] in: effects framework 2017-03-17 17:52:48 -04:00
Paul Licameli 08b99c533b Remove Effect::mWarper, and stack-allocate warpers instead 2017-03-17 17:52:32 -04:00
Paul Licameli 78be459fa1 Convert sampleCount <-> floating or -> long long explicitly ...
... A non-narrowing conversion out to long long is a necessity, but the
conversions to float and double are simply conveniences.

Conversion from floating is explicit, to avoid unintended consequences with
arithmetic operators, when later sampleCount ceases to be an alias for an
integral type.

Some conversions are not made explicit, where I expect to change the type of
the variable later to have mere size_t width.
2016-09-15 21:02:31 -04:00
Paul Licameli 79c79f9cd3 Remove many mentions of sampleCount with auto and decltype...
... This makes much code agnostic about how other things (functions and
arguments) are typed.

Many of these neeed to become size_t instead of sampleCount.
2016-08-24 14:50:45 -04:00
Paul Licameli 1281f1b14b Common function limits buffer size to sampleCount known to be small 2016-08-23 12:46:10 -04:00
Paul Licameli e599cfa6fa Effect::mOutputTracks is managed by smart pointer 2016-08-13 10:37:51 -04:00
Paul Licameli 6fec00149b Remove some naked new amd delete in: Built-in Effects 2016-08-08 07:51:25 -04:00
Paul Licameli 5ef4dd46a5 TrackFactory functions return std::unique_ptr, although some callers...
... release() them for now.
2016-03-26 11:50:12 -04:00
Paul Licameli 0c9deb398c Fix mac build. No standard headers in Audacity.h. 2016-03-01 12:22:37 -05:00
Paul Licameli daa7617e88 auto_ptr (deprecated) -> unique_ptr (preferred in C++11) 2016-02-13 12:00:28 -05:00
Paul Licameli d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04:00
Steve Daulton 8f3c8ac01b Fix - Generate should replace selection.
Generate Silence needs to be inserted into the selection
rather than overwriting mT0 to mT1.
2015-06-12 13:03:14 +01:00
Leland Lucius 5e27710495 All generator effects now use common Duration handling
(Also updated a few windows IDs to fit the pattern)
2015-04-19 19:48:04 -05:00
Paul-Licameli 36dd49ff50 Really fix linux compilation! 2015-04-08 15:12:51 -04:00
Paul-Licameli a562f2c922 Bug834, part 1 - Memory leak and orphans after cancelling any generator
This fixes the first of two related memory leak bugs:

New project.  Make a new track.  Select the track and use any generator, such
as white noise, specifying a long enough length that a progress dialog appears.
Cancel the progress dialog.

Save the project.  Exit and restart Audacity.  Reopen the project.

Orphans!
2015-04-08 11:40:30 -04:00
benjamin.drung@gmail.com 277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
v.audacity c26b3c6b49 Campbell Barton's further patch to turn many, many tabs to our 3-space convenbtion 2013-02-23 04:33:20 +00:00
martynshaw99 b80b89df88 Reset phase at start of each generated waveform. 2011-12-12 23:43:21 +00:00
v.audacity 2ea3fd6553 clarifications in comments 2011-04-18 06:30:07 +00:00
v.audacity c31e01e980 Clean up some issues with Effect abstract classes, primarily that the progress dialog had Stop and Cancel buttons that produced exactly the same results, i.e., Cancel, so I removed the Stop button. 2010-09-02 02:40:17 +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
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
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