libsndfile (can|may) update the headers at close, which can lead to the file being marked newer than the peakfile,
thus causing a rebuild of the peakfile at session (re)load.
Originally detected by Grygorii
On linux SndFileSource::get_soundfile_info was being called with an empty path
value when clicking on a folder in the left side part of the file browser which
resulted in an unnecessary error message.
On Windows every time a directory was selected in the Import dialog,
SndFileSource::get_soundfile_info would fail to open the directory in read only
mode and produce an error, but as we don't want to query/open soundfile info
for directories anyway just test and return if the path is a directory.
see 87b89a6
IMPORTANT NOTE: In theory, the correct glibmm function should have been Glib::filename_from_utf8() but I couldn't make that work on Windows and
ended up using Glib::locale_from_utf8() instead. sfdb import will therefore
need to get re-tested on the other platforms (especially in a non-English locale).
If this fix doesn't work we should probably revert to the previous strategy
but using the global specifier "::g_open()" explicitly…
… and only on PLATFORM_WINDOWS (POSIX #define g_open open) fails regardless.
This reverts commit 1a619472ca.
On Unix systems "#define g_open open" interferes with class member function
IMHO this is the wrong approach, the filename should be converted using
glib::filename_from_utf8().
For sfdb stuff, use glib file functions in preference to ANSI or libsndfile handling. On Windows, we need functions which understand UTF-8 (so that we'll be able to import sound files, even in a non-English locale).
It is less likely that these would cause issues because the
variables involved define the size of the data read, which
is almost certainly less than the 32 bit limit (i.e. they are
not positional). But to keep things clean and to keep questions
at bay, make them 64 bit values.
Do not skip peaks when creating peak files while recording.
Fixes missing peaks in #6127
(TODO: after double-check and sign-off, remove ‘force’
parameter from ::compute_and_write_peaks API)
This was a very clever attempt to fix a non-problem. If the platform doesn't have enough file descriptors available
then the platform is broken and we're not going to hack around trying to fix it.
This cleans up a lot of false-positives in static analysis
and also helps compilers to optimize code paths in general.
(tagging the fatal stingstream operator as ‘noreturn’ is
far less trivial)
It's slightly possible that this causes trivial build failures on different
configurations, but otherwise shouldn't cause any problems (i.e. no actual
changes other than include/naming/namespace stuff). I deliberately avoided
removing libardour-config.h since this can mysteriously break things, though a
few of those do seem to be unnecessary.
This commit only targets includes of ardour/*.h. There is also a very large
number of unnecessary includes of stuff in gtk2_ardour; tackling that should
also give a big improvement in build time when things are modified.
git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf