David Bailes
3bb2a8b170
Fix for bug #1346 - Equalization effect always opens in draw mode
2016-09-23 13:53:47 +01:00
Paul Licameli
f993f1eadf
Regularize casts as (int), so they are easier to find and review
2016-09-20 08:42:11 -04:00
Paul Licameli
b17a14ccc2
Nested loop should use a different index variable...
...
... but there was not a bug here, because of the return.
2016-09-20 06:32:45 -04:00
Paul Licameli
9310c8ae9b
Fix warning about missing field initializers
2016-09-19 11:47:48 -04:00
Paul Licameli
412e4955af
Put braces around sub-object initializers
2016-09-19 11:47:47 -04:00
Paul Licameli
53936ac970
Fix some warnings for unused variables and labels...
...
... But not in cases where a return status is ignored.
2016-09-19 11:47:47 -04:00
Paul Licameli
5d5edecca5
Remove unnecessary semicolons
2016-09-18 10:36:53 -04:00
Paul Licameli
5d102136a2
Fix noise reduction
2016-09-17 15:38:55 -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
99dca62cff
Assert that sampleCount doesn't narrow converting to 3d party types
2016-09-15 21:02:31 -04:00
Paul Licameli
fbfee42a00
Remove another C style cast, and an unnecessary track kind test
2016-09-15 16:10:18 -04:00
Paul Licameli
88611a4530
Fewer C-style pointer casts of tracks; comments justify static_cast
2016-09-15 12:12:43 -04:00
Paul Licameli
4b16705aa5
a little more const
2016-09-13 22:23:17 -04:00
Paul Licameli
39d514b183
Some more const, some stl idioms, remove unused declaration
2016-09-13 22:03:58 -04:00
Paul Licameli
6403031ff7
correct mistake in Paulstretch
2016-09-12 07:51:58 -04:00
James Crook
4eeef25191
More unused parameters and local variables.
2016-09-12 12:33:44 +01:00
James Crook
e39cdce0fc
Merge remote-tracking branch 'walisser/upstream'
2016-09-12 12:22:36 +01:00
Paul Licameli
ed21545c80
pixel column counts and sample window sizes use unsigned types
2016-09-11 20:28:13 -04:00
Paul Licameli
b910bf63da
Style changes and use of unsigned types in PaulStretch effect
2016-09-11 20:28:13 -04:00
James Crook
b44ad7cd71
More unused parameters.
2016-09-11 20:52:04 +01:00
James Crook
65c7e8051a
ThomasFeher - Unused parameters clean up.
2016-09-11 20:31:49 +01:00
Paul Licameli
2263a0f477
Don't use wxArrayPtrVoid with casts, use std::vector
2016-09-08 11:08:49 -04:00
Paul Licameli
67cec5ad83
Make many counts of tracks and channels unsigned...
...
... And in some places where a library uses signed types, assert that
the reported number is not negative.
What led me to this, is that there are many places where a size_t value for
an allocation is the product of a number of channels and some other number.
2016-09-07 10:11:41 -04:00
Paul Licameli
919d77d176
More uses of min and max
2016-09-06 20:46:25 -04:00
Paul Licameli
9d633f4c47
Some simplification in the Repair effect
2016-09-06 12:39:58 -04:00
Paul Licameli
c8e7372886
Rewrite Resample::Process to take and return size_t values
2016-09-06 12:39:58 -04:00
Paul Licameli
c9a9ad6220
Fix incorrect comment, use auto
2016-09-06 12:39:57 -04:00
Darrell Walisser
5f8c48d520
use std::isnan since c++11 provides it and wxIsNan is broken in c++11
2016-09-04 17:00:12 -04:00
Paul Licameli
6043638e31
Another std::min, more auto & decltype, remove more casts
2016-08-29 20:07:43 -04:00
Paul Licameli
38ee7c0e3e
Bug 1501 again: don't crash for extreme Start values for FindClipping
2016-08-28 15:53:51 -04:00
Paul Licameli
36ddd98757
Bug1501: Fix bad_alloc crash for some effects with extreme inputs
2016-08-28 12:30:43 -04:00
Paul Licameli
3b04bb1726
More uses of limitSampleBufferSize
2016-08-27 07:54:22 -04:00
Paul Licameli
52417c444d
Remove unnecessary casts to sampleCount
2016-08-24 14:50:46 -04:00
Paul Licameli
fd2b050d6f
Type agnosticism for some other variables that were not sampleCount...
...
... in some cases, this fixes narrowings.
2016-08-24 14:50:45 -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
ee5a0db9ff
some uses of size_t
2016-08-24 14:50:45 -04:00
Paul Licameli
2949a080d2
More cautions in SBSMSEffect.cpp...
...
... The narrowings from sampleCount to long might be fixed, but it would
require changes in lib-src
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
477d8d9d1d
spaces
2016-08-22 21:45:54 -04:00
Paul Licameli
26b94a447b
change a variable name
2016-08-22 21:45:54 -04:00
Paul Licameli
39df8d0b51
Don't use conversion of sampleCount to bool
2016-08-22 21:45:54 -04:00
Paul Licameli
a6de680cdb
use std::min and std::max
2016-08-22 21:45:54 -04:00
Paul Licameli
2be2e73e66
LadspaEffect::mSampleRate has type double, like other plug-in effects
2016-08-22 21:45:54 -04:00
Paul Licameli
1189cfd62a
Identify the few unsafe narrowing conversions from sampleCount...
...
... I believe this list of four places is exhaustive.
There are many, many more safe narrowings that I examined.
This resulted from changing the definition of sampleCount in my builds so that
narrowing conversions failed to compile without some fixes, and I examined and
fixed every place.
The rest of that work is not yet shared.
2016-08-21 15:28:32 -04:00
Paul Licameli
56586770e0
EffectClientInterface::SetSampleRate takes double...
...
... All the overrides (except Ladspa) were casting it to floating poing anyway
2016-08-21 09:51:32 -04:00
Paul Licameli
49e699b1df
Remove overloads for sampleCount from ConfigInterface...
...
... The value was always cast to int anyway when writing, and it was used
only for one value in VST effect, which did not need 64 bits
2016-08-21 09:11:44 -04:00