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

9674 Commits

Author SHA1 Message Date
Vitaliy Kirsanov
5ada9ee201 Use native CMakeLists.txt for libexpat
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
#
2019-03-16 13:10:21 +00:00
Paul Licameli
f7162d3326 OverlayPanel uses weak_ptr to Overlay, which simplifies other dtors 2019-03-16 08:21:03 -04:00
Paul Licameli
ac2fecf151 Don't rely on order of Bind to EVT_TRACK_PANEL_TIMER from project...
... 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.
2019-03-16 08:20:44 -04:00
Paul Licameli
a73970d864 Rewrite the quick exit test in OverlayPanel::DrawOverlays 2019-03-16 08:07:09 -04:00
Paul Licameli
4dbe88df26 Remove rectangle calculation that became unused at cb3e5e6 2019-03-16 07:59:40 -04:00
Paul Licameli
e6324e86ac Fix cross-platform one-pixel differences in line drawing...
... 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.
2019-03-16 07:51:28 -04:00
Paul Licameli
2d144bfbc2 Simplify many calls to ShuttleGui that add choice controls 2019-03-16 07:32:40 -04:00
Paul Licameli
dd86346156 ShuttlegGUI: const wxArrayStringEx & arguments, not wxArrayString *...
... for choice, combo, and listbox; reference allows passing temporaries,
eliminating need for some variables to hold the string arrays.
2019-03-16 07:17:21 -04:00
Paul Licameli
dcd82b8ef5 ShuttleGui::AddChoice takes int to specify selection, with a default...
... This makes things brief and where non-default avoids some repetition of
literal strings
2019-03-15 23:35:13 -04:00
Paul Licameli
fbf324f52e Redeclare many wxString with various type aliases for various uses...
... and many wxArrayString are replaced with either wxArrayStringWx or with
std::vector< wxString >, suitably aliased
2019-03-15 16:25:36 -04:00
Paul Licameli
06b3b42794 Remove unnecessary initializers for empty wxString 2019-03-15 15:18:11 -04:00
Paul Licameli
5fd6965925 Use type aliases CommandID, CommandIDs...
... for identifiers of menu commands and macros, and for vectors thereof
2019-03-15 15:18:11 -04:00
Paul Licameli
135c2a71ce Replace "" and wxEmptyString with {} in default argument values 2019-03-15 15:18:11 -04:00
Paul Licameli
a30000cf74 Use type aliases FilePath, FilePaths...
... 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)
2019-03-15 15:18:11 -04:00
Paul Licameli
485b6bb425 Use type aliases FileExtension, FileExtensions...
... 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
2019-03-15 15:18:11 -04:00
Paul Licameli
df6a2cf479 Use type aliases RegistryPath, RegistryPaths...
... for wxString and vector thereof, holding strings that key into wxConfigBase;
to be replaced later with different types
2019-03-15 15:18:11 -04:00
Paul Licameli
dcd211affa Use type aliases PluginPath, PluginPaths...
... 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
2019-03-15 15:18:11 -04:00
James Crook
2d71cc9d60
Merge pull request #342 from yasarciv67/master
Add tr language to audacity.desktop.in
2019-03-15 13:55:50 +00:00
Yaşar
896c19aaba
Update for Turkish 2019-03-15 16:17:00 +03:00
James Crook
32e6d0496f
Merge pull request #334 from mlocati/update-italian-translation
Update Italian translation
2019-03-15 12:30:07 +00:00
Henric Jungheim
d06abcd27e Enable conformance mode for the FileDialog and Audacity projects. 2019-03-15 10:13:27 +00:00
Henric Jungheim
0f33e2bafa Provide global build defaults for Windows.
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.
2019-03-15 10:11:35 +00:00
Henric Jungheim
d734cf9a4e Drop an unmatched quote from the Audacity Debug configuration's include dirs. 2019-03-15 10:11:35 +00:00
David Bailes
b8b2f4380e Bug 2080: Using WASAPI, after recording, playback can fail
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.
2019-03-15 10:03:46 +00:00
Paul Licameli
dfeb7e18aa Type aliases for some uses of ComponentInterfaceSymbol...
... to be replaced later with distinct types

Also changing FamilyId => Family in function names

Also NumericFormatId => NumericFormatSymbol
2019-03-14 17:26:20 -04:00
Paul Licameli
cc92c7605e Rename typedef PluginIDList to PluginIDs 2019-03-14 17:15:41 -04:00
Paul Licameli
b8c0125143 Replace comparisons against wxEmptyString with empty() 2019-03-14 16:20:18 -04:00
Paul Licameli
50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -04:00
James Crook
804b6c8bd8 Merge remote-tracking branch 'upstream/pr/340' 2019-03-14 11:21:52 +00:00
James Crook
ddba48ca5a Merge remote-tracking branch 'upstream/pr/339' 2019-03-14 11:11:17 +00:00
James Crook
487f600702 Merge remote-tracking branch 'upstream/pr/333' 2019-03-14 11:10:35 +00:00
Steve Daulton
2673e28f4a Correct "Hanning window" to "Hann window"
Updated in user facing text and comments. Variable names left as is.
2019-03-14 10:11:16 +00:00
Paul Licameli
2991928437 Remove stripping of / and & and space from align command ids ...
... this has been unnecessary since commit 9780c14
2019-03-13 01:09:52 -04:00
Paul Licameli
b32940d931 Simplify specification of command item groups in Tracks menu 2019-03-13 01:09:52 -04:00
Paul Licameli
6d5bc21d50 Define and use wxArrayStringEx...
reducing verbosity where there were repeated calls of Add(), and defining
move construction and assignment for efficient returns from functions
2019-03-10 16:23:44 -04:00
Paul Licameli
07a42e8e19 Make NoiseReduction.cpp compilable with ADVANCED_SETTINGS 2019-03-10 16:21:16 -04:00
Paul Licameli
da33daf197 Some replacements of wxArrayString with auto 2019-03-10 14:47:12 -04:00
Paul Licameli
e46990f709 Less use of wxWidgets-specific idioms for wxString & wxArrayString...
... 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.
2019-03-10 14:45:29 -04:00
Paul Licameli
2a1bf3a77f More std:: style for wxString...
... 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!)
2019-03-10 14:45:20 -04:00
Paul Licameli
795b6a2e42 More std:: style for wxString and wxArrayString...
... Replacing:

Insert => insert
RemoveAt => erase
Remove => erase
IsSameAs => operator == or operator !=
   (but only when second argument was true or default)
2019-03-10 14:45:12 -04:00
Paul Licameli
dd8eb9e3d9 Less use of wxArrayString::Index() ...
... 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.
2019-03-10 14:45:06 -04:00
Paul Licameli
c68e336247 More use of std:: style members of wxString...
... replacing:

Length => length
Len => length
2019-03-10 14:44:54 -04:00
Paul Licameli
2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... 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
2019-03-10 14:43:57 -04:00
Paul Licameli
5daa67dfe6 Remove uses of wxSortedArrayString 2019-03-10 14:43:53 -04:00
Paul Licameli
52642e49a5 Define and use utilities transform_range, transform_container 2019-03-10 14:43:47 -04:00
Steve Daulton
b0738f6e09 Fix for bug 2050
This fix will become irrelevant when LAME is included, but may as well
fix it in the meantime.
2019-03-10 17:44:44 +00:00
Steve Daulton
8012f6b2dd Fix for bug 2072
id3_length_t is defined as "unsigned long" in id3tag.h, but is undefined
when building without libid3tag.
2019-03-10 17:35:52 +00:00
Paul Licameli
e832b6895e Case insensitive comparison for file extensions in two places...
... consistent with handling of file extensions elsewhere
2019-03-10 12:55:53 -04:00
Paul Licameli
a5e0b66d1f WrappedType is immutable (though it points to something mutable) 2019-03-10 12:38:35 -04:00
Paul Licameli
459582ce00 Remove some repetitous push_back 2019-03-10 12:34:49 -04:00