On non-FHS systems like NixOS, there is no `/usr`. Additionally,
Nix has immutable packages so mbrola cannot be installed to espeak-ng’s
`datadir`. Instead, packages are expected to find data under one of the paths
listed in `XDG_DATA_DIRS` environment variable, as defined in the XDG Base
Directory Specification:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html#variables
84e967c0a2 ("Update translate.c") (sic) dropped the initialization of
number_buf, breaking the CI on ubuntu amd64 clang+msan, ubuntu amd64/i386
gcc/clang+valgrind,
While this probably deserves cleaning up, we'd rather not break the CI,
to be able to properly track regressions.
Without this function declaration, the build fails on modern C compilers (ISO C99). This affects e.g. builds on Apple Silicon. This fix is also needed in order to compile rasspy/piper on Apple silicon
speechPlayer: fix sample type qualification to avoid ambiguity
As reported in <https://bugs.freebsd.org/271486>, when the C++ standard
library provides std::sample, it causes a compile error when compiling
speechWaveGenerator.cpp:
src/speechPlayer/src/speechWaveGenerator.cpp:197:56: error: reference to 'sample' is ambiguous
unsigned int generate(const unsigned int sampleCount, sample* sampleBuf) {
^
src/speechPlayer/src/sample.h:23:3: note: candidate found by name lookup is 'sample'
} sample;
^
/usr/include/c++/v1/__algorithm/sample.h:95:17: note: candidate found by name lookup is 'std::sample'
_SampleIterator sample(_PopulationIterator __first,
^
Since speechWaveGenerator.cpp puts "using namespace std;" at the top,
fix the error by qualifying "sample" with an explicit "::".