... A call graph browser easily shows that the extra generality of fetching
samples in some other format is only used in Benchmark -- where the format is
always the same as what the track is constructed with.
This makes re-verification of the claims in comments two commits ago easier.
... incidental to a review of CopySamples in it. This code is used only when
importing an old-style .aup project file into the new project format.
Fixed some RAII for file handle.
Rewrote every call to IsGoodInt or IsGoodInt64 with a narrowly scoped temporary
variable.
Use IsGoodInt64 only for total track lengths and positions; but use IsGoodInt
for block and blockfile sizes, which are not supposed to be huge but are
supposed to fit in memory buffers.
... See allocation of RingBuffers in AudioIO.
Playback buffers always used floatSample format so this change has no
effect on them.
But we also want no extra dithering applied during recording, where the capture
format might be narrower than float.
.. Call the function SamplesToFloats instead, or in one place, where source
is also always float, just do memcpy.
Dithering never happened in these cases.
... the former uses Prefs, wxApp, and AudacityMessageBox, the latter has no
dependency on them.
Also move some other functions from GUIPrefs into namespace Languages.
... Expand it in AudacityApp where initializing i18n services.
Just call SetLang directly in CrashReport, because the argument was not null.
Also eliminate call to SetLang in Nyquist, where really only the system language
was needed.
1. We put all shared libraries into one place. Both conan and locally built
2. We invoke CopyLibs to copy the libraries to a proper location and to correctly set the RPATH
Fixes CopyLibs script on Windows
Fixes CopyLibs.cmake for Linux
Fixes CopyLibs on macOS
Fixes CopyLibs on macOS
... Now new project windows are opened when .aup3 files are opened; but
behavior chages only in that case.
Wherever opening of other files invoked import code, we still do or do
not make a new project in exactly the same cases as before; such as, when
opening multiple files with File > Open, be sure each imported file still opens
in its own separate window.
This means the decision whether to open a new project must be lowered into
ProjectFileManager, where the type of the file is discovered, and we pass it a
function object so it avoids a dependency cycle with ProjectManager.
It also means the checking for errors and closing of new projects in case of
failure must be replicated at all places where ProjectFileManager::OpenProject
is called directly.
The class ProjectManager::ProjectChooser simplifies this.
Recently introduced calls to SafeToOpenProjectInto(), before
ProjectManager::OpenProject(), are now lowered into that class, delaying the
safety check so it might also be called where ProjectFileManager is used
directly.
... It is false in exactly the cases where there is now also a check first for
the safety of opening a project file.
Those are the cases where a new project was made for imports, but this was not
necessary for safety. Yet old behavior will be preserved in such cases.
add_conan_lib cmake function is defined, that allows to add a dependency using Conan with two possible system fallbacks:
1. pkg_check_modules is invoked, if `PGK_CONFIG ...` is present
2. find_package is invoked if `FIND_PACKAGE_OPTIONS` is present and `pkg_check_modules` has failed
If `ALWAYS_ALLOW_CONAN_FALLBACK` is present - `obey_system_dependencies` will be ignored for the package
Currently, the following dependencies are retrieved using Conan:
* zlib
* expat
* wxwidgets
* libmp3lame
* libid3tag
* libmad
The last three libraries are included in this commit, as they depend on zlib.
Properly pass **arch** and **os.version** to Conan
Since XCode 10, Apple does not recommend building for macOS <10.9
Reason - 10.7 and 10.8 require libstdc++
We enforce libc++
```# Shouldn't cmake do this???
string( APPEND CMAKE_CXX_FLAGS " -stdlib=libc++" )```
While this generally works, it makes the proper dependency management tricky.
Compiler message for the library support:
```
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
```