1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 17:19:43 +02:00

6056 Commits

Author SHA1 Message Date
Paul Licameli
f9f95471b5 Don't compile unused static function 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
54c993c4f5 Avoid unreachable code warning 2016-09-19 11:47:47 -04:00
Paul Licameli
dcf114426f Merge branch 'master' into warnings 2016-09-19 11:47:21 -04:00
Paul Licameli
0eb2f85bfb Use DBL_MAX, not arbitrary 1000000000.0, as "infinite" time interval 2016-09-19 10:38:42 -04:00
Steve Daulton
ce1f587feb Merge pull request #167 from tip2tail/mMessageFix
Thanks Mark. Looks good to me and tests fine on Linux and Mac.
2016-09-19 14:16:03 +01:00
Mark Young
655d7596ab Assign mMessage to the first column wxStaticText control to allow non-TimerRecord usages to work correctly. 2016-09-18 22:15:54 +01:00
Gale Andrews
17afc51644 Typo in code comment 2016-09-18 18:56:34 +01:00
Paul Licameli
76a391f987 Fix various "pedantic" compiler warnings from clang
* commit '236a271ef506bdc357c47776178d5a21a5506495':
  Avoid dangling else warning
  Avoid unused parameter warnings
  Make switches on enums exhaustive
  be explicit about || and && precedence
  don't implicitly convert string literal to non-const char *
  avoid bogus warning about C99 compound literals
  Remove unnecessary semicolons
2016-09-18 10:37:39 -04:00
Paul Licameli
236a271ef5 Avoid dangling else warning 2016-09-18 10:36:55 -04:00
Paul Licameli
981020a8fc Avoid unused parameter warnings 2016-09-18 10:36:55 -04:00
Paul Licameli
7b87ca6ffd Make switches on enums exhaustive 2016-09-18 10:36:55 -04:00
Paul Licameli
0323cb8e38 be explicit about || and && precedence 2016-09-18 10:36:55 -04:00
Paul Licameli
b6dce3e842 don't implicitly convert string literal to non-const char * 2016-09-18 10:36:54 -04:00
Paul Licameli
3b7b7e1481 avoid bogus warning about C99 compound literals 2016-09-18 10:36:54 -04:00
Paul Licameli
5d5edecca5 Remove unnecessary semicolons 2016-09-18 10:36:53 -04:00
Gale Andrews
16e6629eca Some changes based on points by Dyddye in PR #102
Also equalize the line length at about 80 characters.
2016-09-18 00:13:10 +01:00
Paul Licameli
5d102136a2 Fix noise reduction 2016-09-17 15:38:55 -04:00
Steve Daulton
341e3e1207 Fix bug 1513
The error message is still a bit strange if trying to overwrite
a different project when the current project has been saved,
(why would you do that?), but probably not worth complicating
the message for such a fringe case.
2016-09-17 15:52:52 +01:00
Paul Licameli
2ec12d2ffd sampleCount is a class with explicit conversions to numbers...
... In particular, narrowing integer conversions are done only in
sampleCount::as_size_t which asserts correctness.

... And the overuse of that type is now corrected.  size_t is now used for any
number of samples that fits in memory or a block file.  sampleCount is reserved
to describe an offset into an audio file or wave track or clip, or the
difference of two such.  sampleCount is signed, but size_t of course is not.
sampleCount is 64 bits wide, but size_t is narrower (in 32 bit executables,
such as we still build).

  Hide implicit conversions sampleCount <-> floating point, -> integer
  Change sampleCount arguments, variables, return values to size_t...
  Make many conversions sampleCount->size_t are explicit and checked...
  Convert sampleCount <-> floating or -> long long explicitly ...
  Assert that sampleCount doesn't narrow converting to 3d party types
  Define sampleCount as a class, not a type alias...
2016-09-15 21:11:12 -04:00
Paul Licameli
a368eda73a Hide implicit conversions sampleCount <-> floating point, -> integer 2016-09-15 21:06:42 -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
26b5e77050 Define sampleCount as a class, not a type alias...
... Define lots of operators for disambiguation, but they will go away after
all conversions from sampleCount to built-in numerical types are forced
to be explicit.
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
837173e9ad Mac screen reader speaks the tracks' types, as also on Windows 2016-09-15 09:45:33 -04:00
Paul Licameli
fa0a603804 Fix crash when sync-lock adjusting a note track 2016-09-15 08:33:15 -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
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
Steve Daulton
740ec8b72b Remove redudant comment
Residual from previous commit
2016-09-13 00:48:44 +01:00
Steve Daulton
340c1ff9f0 Merge pull request #159 from tip2tail/Bug1403SplitMessage
Bug1403 Progress Dialog Split Message Fixes
2016-09-13 00:32:14 +01:00
James Crook
0f5260e600 Bug 1512 - Extended Import: Crash dragging an importer when there are no rules 2016-09-12 20:49:49 +01:00
tip2tail
56b1f2d2cb Bug 1403 - Message can now be displayed in multiple columns
Uses 'End-of-Transmission-Block' character to mark the column split(s)
and is defined as a static constant for ease of use.
2016-09-12 19:30:10 +01:00
Sven Giermann
ce09f4b883 Make RuleTable scrollable & DnD move instead of copy
Having lots of rules in RuleTable may lead to an assertion failure on opening preferences dialog:

> assert "sz.x <= 1000 && sz.y <= 750" failed in
> PrefsDialog::PrefsDialog(): Preferences dialog exceeds max size

This change will make the RuleTable scrollable (as it is/was when creating many rules) instead of expanding the dialog size.
Further I had to fix the calculation of the clicked row from the given coords. Even without this proposed change for scrolling, the calculated row has always been the one above the clicked row - maybe this changed in wxWidgets 3.0.
Now it uses CalcUnscrolledPosition() which seems to work fine even without scrolling.

Last change is for drag and drop mode: rules are not being copied, but moved on dnd - I changed this to reflect this mode on the cursor while dragging an item.
2016-09-12 17:09:42 +01:00
Thomas Fehér
df2de94f6b ThomasFeher - continuous integration (appVeyor) of build for Windows
Adds a configuration for appVeyor triggering a build of the release
version for each new commit. Needs registering at ci.appveyor.com with
the github account. Debug is not built, due to time limit of the free
version of appVeyor. Release build takes at least 30 minutes and up to
45 minutes. The time limit is 60 minutes.

Uses the undocumented possibility of building wxWidgets as dynamic
library by specifying "DLL Release" as configuration. The method in the
install instructions is impossible to automate as far as I could find
out.

Builds all targets except of "help" and "locale", because locale took
too long for the complete build to succeed the time limit.
This is not satisfying as new targets must be added manually to the
build. If this does not happen, the build will not fail, although the
new target could possibly fail building.
Unfortunately their seems to be no way to build the default targets
while excluding specific ones.
Adding target "help" was not tested.

Possible improvement: Put the complete "install" part into a install
script. That would help people easily building audacity and prevent
outdated install instruction as is the case at the moment.

I am not sure if renaming wx/setup_redirect.h into wx/setup.h is the
correct way, but it seems to work. Following the install instructions
resulted in missing wx/setup.h.
2016-09-12 15:34:56 +01: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
0f417a65c7 RaphaelMarinier - Initialise mFreqSelTrack (found by Valgrind) 2016-09-11 22:00:01 +01: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
Gale Andrews
e8bf7a41eb Use agreed www. version of our address
rather than some entries with and some not.
2016-09-11 17:31:25 +01:00
James Crook
4251ef8c48 Avoid wasteful Refresh() in stereo track spectrogram view.
Thanks to Darrell Walisser for the outline of the problem, which was causing laggy dragging of stereo track sizes in spectrogram view.
This was caused by refreshing the horizontal ruler unnecessarily.
2016-09-11 16:52:49 +01:00