cmake-proxies/expat/CMakeLists.txt seems to make more problems than it
solves. But the native one appears doing its job well on multiple
platforms. Tested on Windows, OSX, Linux and FreeBSD.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Author: Vitaliy Kirsanov <krokoziabla@yandex-team.ru>
# Date: Thu Mar 14 19:03:29 2019 +0300
#
# On branch tmp
# Your branch is up to date with 'my/tmp'.
#
# Changes to be committed:
# modified: cmake-proxies/CMakeLists.txt
# deleted: cmake-proxies/expat/CMakeLists.txt
# modified: lib-src/expat/CMakeLists.txt
#
# Changes not staged for commit:
# modified: lib-src/expat/CMakeLists.txt
#
... instead, re-process the event, and let each handler bind to the one it
depends on.
This still leaves a critical ordering of construction of playback scroller and
play indicator overlay in AudacityProject::AudacityProject (reverse of the
previous), but that will be removed by other means.
... Make all line drawing go through our AColor which wraps the wxDC
line-drawing functions.
Despite what wxWidgets documentation says, the functions still don't
consistently include the first point and omit the last point of a line. I
observed inclusion of both on Mac, while on Windows, omission sometimes of the
first point instead of the last.
Discrepancies could be observed in 2.3.0 between Windows and Mac, using the
Window magnifier or command+alt+ +, zooming in closely on the ends of the
shadow lines below and right of tracks, or at the bottom-right corners of the
bevels drawn around vertical rulers.
So where there is an observable one-pixel difference of drawing between
platforms, there is the question, which was the intent when the drawing code
was written? Should the coordinates be corrected by one or not?
I reviewed each case and used my judgment.
Most of the calls are in drawing rulers. Major tick lines were drawn five
pixels long, and minor, three, on Mac. I keep this behavior, but you might
argue for making them four and two.
On the other hand the drawing of ruler grid lines, which you can see in
the equalization and frequency analysis windows, did need a one-pixel correction
to avoid straying out of bounds.
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types
(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
... for wxString and wxArrayStringEx, holding file extensions (without dot);
to be replaced later with different types
(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
And simplify some constructions of arrays
... for wxString and vector thereof, when holding plugin paths (which may or
may not be interpreted as file paths, depending on the module); to be replaced
later with different types
Set the SDK to 10.0.17763.
Set a default WXWIN property if the WXWIN environment variable is not set.
Source files will be interpreted as UTF-8 by default.
Use LTCG for release builds.
The bug:
1. Set Audio host to WASAPI
2. choose recording and playback devices which have different default sample rates in shared mode.
3. Set overdub, and playthrough to off.
4. make a short recording.
5. playback. Fails with error dialog.
Cause of bug:
In AudioIO::GetBestRate, the last returned sample rate is cached. If the function is called again, with the same requested sample rate, then the cached value is returned. So in the above steps, when GetBestRate is called for playback, the sample rate of the recording device is returned.
Fix:
Include in the conditions for returning the cached rate that the values of playing and capturing as the same as in the previous call.
... more use of standard library style alternatives instead.
Other types may then more easily replace them in future: std::vector of
wxString or of other string-like classes.
... Remove all uses of the three-valued Cmp comparison member function, which
returns 0 for equality, except in one place. Use operators == and != instead.
(C++20's spaceship operator hasn't landed here yet!)
... Replacing:
Insert => insert
RemoveAt => erase
Remove => erase
IsSameAs => operator == or operator !=
(but only when second argument was true or default)
... instead use the utility make_iterator_range and its index() or contains()
method. This generic utility works with any container defining begin() and
end().
This further lessens dependency on wxWidgets container idioms.
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes
for wxString,
IsEmpty => empty
Clear => clear
Alloc => reserve
for wxArrayString,
Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve