Paul Licameli
8b66fc4b05
Restore change of Waveform dB scale with change of magnification...
...
... This is done with Shift+Ctrl+wheel and pointer in the vertical ruler, and
the pointer y coordinate near the bottom of the dB scale.
If y coordinate is far from there, then Shift+Ctrl+wheel changes dB level
without change of magnification (as before this commit).
2016-10-28 12:36:26 -04: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
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
d783762737
Remove unnecessary std::move in return statements...
...
... and comment where it is necessary.
2016-09-15 07:39:46 -04:00
Paul Licameli
ed21545c80
pixel column counts and sample window sizes use unsigned types
2016-09-11 20:28:13 -04:00
Paul Licameli
919d77d176
More uses of min and max
2016-09-06 20:46:25 -04:00
Paul Licameli
ed7bfd8835
Small improvements to the logic of WaveTrackCache
2016-09-05 16:28:04 -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
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
69064edf20
Add explicit cast to sampleCount where negative values are possible
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
5cf331ae8c
Rewrite WaveTrack::GetEnvelopeValues, taking one less argument...
...
... In practice this argument was always 1 / rate so it was superfluous.
Also make the buffer size argument unsigned.
2016-08-21 09:45:53 -04:00
Paul Licameli
46f38708ed
Dir manager uses std::shared_ptr
2016-08-13 12:23:05 -04:00
Paul Licameli
cb48ca2b91
Use arrays of smart pointers to WaveClip
2016-08-12 20:53:38 -04:00
Paul Licameli
a400a7408c
Distinguish whether clip ptr arrays own; vector; const-correctness
2016-08-12 20:53:38 -04:00
Paul Licameli
afc22caf5a
WaveClip::GetCutLines() returns a reference
2016-08-12 20:53:37 -04:00
Paul Licameli
77a3647922
Simplify iterations over WaveClips in WaveTrack.cpp; stl idioms
2016-08-12 20:53:37 -04:00
Paul Licameli
b548e641ae
Simplify iterations over WaveClips outside of WaveTrack/WaveClip; ...
...
... also add some const qualifiers
2016-08-12 20:53:37 -04:00
Paul Licameli
14c23803ac
Various uses of make_unique
2016-08-10 11:05:52 -04:00
Paul Licameli
6e4e710d3b
Remove seeming naked new and deletes in comments and uncompiled code
2016-08-10 11:05:51 -04:00
Paul Licameli
20bee00115
Remove some naked new amd delete in: tracks and clips
2016-08-08 07:30:44 -04:00
James Crook
68285298ed
Bug 1175 - Stereo tracks may have different zoom per channel
2016-07-15 13:06:45 +01:00
Paul Licameli
2e63a0ad37
Bug1434 (the crashing part) mixing and rendering a track with gaps
2016-07-04 16:52:02 -04:00
Steve Daulton
03915b4438
Fixes to Analyze Contrast
...
Now supports stereo tracks. Several tweaks to error messages,
validation logic, and accuracy improvements.
Includes a fix for summary64K (incorrect rms drawn on zoomed
out waveform).
2016-06-21 22:07:50 +01:00
Paul Licameli
079eb3e98e
Bug1375: Fix sync-lock behavior ...
...
... which was broken by commit 3015a9c8d9229406f8c33fd32ffc64c11d77ca54
2016-05-21 02:04:12 -04:00
Paul Licameli
1033095696
RAII for locking of WaveTracks
2016-04-12 00:55:59 -04:00
Paul Licameli
f94b3b3afa
Add some const qualifiers to BlockFile methods
2016-04-10 21:05:20 -04:00
Paul Licameli
3015a9c8d9
Track cut and copy functions return a unique_ptr argument...
...
... Because they are factory functions.
2016-03-26 11:50:13 -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
f42a953752
Track duplication methods return unique_ptr, although some callers...
...
... simply release() them for now.
2016-03-26 11:50:10 -04:00
Paul Licameli
2157b92b7b
Another const argument, another "override"
2016-03-02 12:47:52 -05:00
Paul Licameli
0c9deb398c
Fix mac build. No standard headers in Audacity.h.
2016-03-01 12:22:37 -05:00
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