... Assuming that large unsigned magnitudes with high order bit set are not
the problem, but signed negatives of small magnitude may be:
1) Always cast the unsigned to signed in comparisons, not the other way.
Also:
2) Cast unsigned TERM to signed by itself, before subtracting. Don't cast
the result.
3) Rewrite some comparisons by moving subtracted term to other side.
See commits
d2fe7b1757f463eda36c
... Also checked more error returns from library functions. Detect it when
write fails (maybe because of exhaustion of space) -- don't continue,
pretending all is still well.
Using one non-specific error message in many places, because we're in string
freeze now.
* Fix building without libid3tag
* Fix building without libid3tag
Extend the pull Audacity#214 from torto9 to fix building
with twolame but without libid3tag
... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.
Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
... There are four different code paths to test, for four different "Download"
buttons:
The two "Download" buttons in the Libraries preference dialog; and,
The Download button in each of the two dialog boxes that follow the two
"Locate..." buttons.
There are just two new help pages in a proper build of local help, each the
target of two buttons.
One of these pages is called "FAQ:Installing the FFmpeg-Import-Export Library"
rather than "FAQ:Installing the FFmpeg-Import/Export Library"
because there are some difficulties preventing links to pages with "/" in the
title, which I didn't try to fix.
Previously this was hard coded to use the online alphamanual.
Some other help-on-errors paths were hardcoded to use the online manual, and did not use local help even if available, so these were changed too.
Also two naming changes in the code:
ShowHelpDialog() became ShowHelp() because it typically shows the help in your browser, only showing the help in a dialog under certain circumstances.
The helpURL parameter became helpPage since it is usually a page name that is then elaborated into a url.
The Link() function became InnerLink().
Some careful http -> https changes made too.
... 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.
... 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.
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls. Mostly useful as documentation of design intent.
Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
Audacity can be built with dynamically loading/unloading the MP3 library
(the default) or dynamically linked against the shared object file
(--disable-dynamic-loading). The code to load the library is only needed
in the former case.