Commit Graph

58 Commits

Author SHA1 Message Date
Paul Licameli
81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
Paul Licameli
ad04187a41 Change sampleCount arguments, variables, return values to size_t...
... whenever they really describe the size of a buffer that fits in memory, or
of a block file (which is never now more than a megabyte and so could be fit in
memory all at once), or a part thereof.
2016-09-15 21:03:17 -04:00
Paul Licameli
078ff056e2 Make many conversions sampleCount->size_t are explicit and checked...
... with run-time assertions.

I examined each place and reasoned that the narrowing was safe, and commented
why so.

Again, there are places where the sampleCount variable will later be changed
to have a different type, and they are not changed here.
2016-09-15 21:02: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
b5e410d987 Fix Windows build differently 2016-08-24 12:13:53 -04:00
James Crook
781de82d02 Workaround build breakers. Needs review.
These changes fix a broken build in Windows.
#include <algorithm> needed for min/max to be in std.
decltype(+name) was declaring a const variable, that could not be incremented.  Changed to auto.
2016-08-23 21:46:12 +01: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
4045d96a58 Fix a memory leak I introduced in Truncate Silence ... sorry 2016-08-10 11:05:52 -04:00
Gale Andrews
df3003fe62 Use same term as used in the Manual. 2016-04-29 16:09:18 +01:00
Paul Licameli
911513fefe Fix new TruncateSilence -- be sure to iterate over the correct track list 2016-03-14 11:30:03 -04:00
Paul Licameli
74dc49a9e9 Fix new TruncateSilence -- be sure to iterate over the correct track list 2016-03-14 11:29:34 -04:00
Paul Licameli
c98b090182 Rename SyncLockTracksIterator::First to StartWith to be consistent 2016-02-24 12:59:28 -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
507cee7ee5 One less indirection accessing Region 2016-02-02 11:49:53 -05:00
Paul Licameli
3c2e88a6dc Fix compiler warning 2016-01-29 10:14:52 -05:00
Paul Licameli
cdc8142940 Fix the new Truncate Silence 2016-01-23 09:08:27 -05:00
Paul Licameli
513d1c548f Enh52: Truncate Silence has an option to process tracks independently...
When the new checkbox is on, truncate each selected wave track independently.

Refuse to do it if any two selected audio tracks are sync locked to each other.

But label tracks sync-locked with a selected wave track will truncate as
expected.
2016-01-23 00:46:10 -05:00
Paul Licameli
97e8fe3864 include <algorithm> to fix Windows build 2016-01-21 10:41:03 -05:00
Steve Daulton
46055cde25 Fix effect preview issues
Fixes bug 1274 and unblocks bug 995.
2016-01-20 18:19:11 +00:00
Paul Licameli
e70f91c64e Removed ShuttleGui.h from other headers 2015-07-19 12:31:03 -04:00
Steve Daulton
d9f3c432d4 Fix for bugs 943, 942, 941, 843 and 775.
Non-linear effects now process tracks before mixing.
This will be slower when multiple tracks are selected
but the preview should now match the applied effect.
SetLinearEffectFlag(true) allows linear effects to
preview more quickly when multiple tracks selected, by
pre-mixing selected tracks.
Simple generators like Tone and Noise may be marked as
'linear' so that they only preview a few seconds.
Generators that vary over time (such as Chirp) must use
the full duration that is set. As this currently
requires calculating the full duration, preview for
'non-linear' generators are not limited to the preview
length.
2015-05-15 12:51:51 +01:00
Leland Lucius
7a0aa43a82 Convert all wxTRANSLATE() to XO()
XO() can be used anywhere a string must be extracted for translation
but not automatically translated at runtime.
2015-04-18 23:03:49 -05:00
Leland Lucius
8fbfa460c4 Migrating the remaining effects
This brings the builtin, LV2, and VAMP effects inline with the
Audio Units, LADSPA, and VST effects.  All effects now share
a common UI.

This gives all effects (though not implemented for all):

User and factory preset capability
Preset import/export capability
Shared or private configuration options

Builtin effects can now be migrated to RTP, depending on algorithm.
LV2 effects now support graphical interfaces if the plugin supplies one.
Nyquist prompt enhanced to provide some features of the Nyquist Workbench.

It may not look like it, but this was a LOT of work, so trust me, there
WILL be problems and everything effect related should be suspect.  Keep
a sharp eye (or two) open.
2015-04-16 23:36:28 -05:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
stevethefiddle@gmail.com
6003abb21d Bug 713 - remove duplicate "dB" label. 2014-06-01 13:01:42 +00:00
stevethefiddle@gmail.com
fbf9ca213c Bug 717 - Truncate Silence outLength calculation. 2014-05-17 14:54:26 +00:00
martynshaw99
1ffd419b11 Steve's changes to 'Truncate Silence' which compile for me, and the result seems sensible, but I have not done any 'code review' so committing this on trust. Very limited risk, one 'effect'. 2014-03-19 00:50:24 +00:00
v.audacity
18e45e1e58 Make some strings translatable, per Steve's 'Untranslated labels in effects' post on -quality. 2013-12-14 02:07:06 +00:00
martynshaw99
b5af4d6120 Steve's patch for bug 434, let's get that closed off! 2013-12-05 00:29:17 +00:00
martynshaw99
c9d6e0f4ef A (slightly) modified version of Steve's patch on Bug 433, with a much improved UI (thanks Steve!). 2013-12-04 00:49:37 +00:00
RichardAsh1981@gmail.com
6a7da21dec remove various unused #defines and bits of code, patch by Campbell Barton 2013-09-23 20:16:02 +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
b33983833b Remove individual credits from built-in effects. Should always be in About dialog instead. 2013-06-21 22:10:50 +00:00
martynshaw99
1ddee72498 Remove EXPERIMENTAL_TRUNC_SILENCE #ifdefs since it is no longer experimental. 2013-05-01 22:07:08 +00:00
v.audacity
17bb48d682 consistency about parentheses (I love 'em!) 2012-08-20 21:46:12 +00:00
v.audacity
e39d816002 Increase height of default window, per follow-on to http://bugzilla.audacityteam.org/show_bug.cgi?id=547#c10.
Restore a comment.
2012-08-04 23:37:44 +00:00
v.audacity
ebb4f530bb Apparently, wxConfigBase::Write() does not update values for next access on all platforms unless Flush() method is called. Added many calls to wxConfigBase::Flush() to make sure the Rad() calls get the right values. 2012-08-02 06:03:19 +00:00
james.k.crook@gmail.com
dd97cae3d9 Removed some (hidden) Cleanspeech cruft that had been used to disable effects. Made some static text open to translation. Added more i18n hints (thanks Thomas Breinstrup). 2012-04-05 11:21:15 +00:00
james.k.crook@gmail.com
63f0b8b09e Fixed more internationalisation hints. 2012-03-20 16:17:37 +00:00
martynshaw99
309f9a90ce Disallow non-numeric chars in numeric input boxes.
Patch by Ed using examples by Martyn & James.
2011-06-16 23:29:56 +00:00
BusinessmanProgrammerSteve
f430aad99b Fix crash mentioned in bug 215 (work around old wxList bug) 2010-09-08 04:02:52 +00:00
v.audacity
340667167e Improve acccuracy of comments. 2010-09-07 23:37:45 +00:00
BusinessmanProgrammerSteve
fcb9e4e365 Restore some r10644 changes: ReplaceProcessedTracks() calls on early returns,
documentation at top. These should prevent a memory leak.
2010-09-04 02:56:53 +00:00
BusinessmanProgrammerSteve
99581b4dc5 (bug 215) Fixes problem where non-silent region is truncated 2010-09-03 05:57:43 +00:00
BusinessmanProgrammerSteve
1b8a8cb8bc Revert r10644. 2010-09-03 05:39:17 +00:00
v.audacity
ff93517312 (bug 215)
Found some major memory leaks and fixed those, but they shouldn't have caused the crashes. 

No reason to DeleteContents on a RegionList immediately after it's declared (especially when not doing so when finished with the RegionList), so I removed those.

Corrected some comments. Improved readability.
2010-09-03 01:42:02 +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