wscript:
Fix syntax of wscript according to pep8 (but do not break long lines).
Remove unused imports and move all module level imports to the top of
the file.
Fix broken build target of IIO driver (source argument to
`create_driver_obj()` supplied an uninitialized variable).
Break lines at 120 chars.
When using as sync opbject the given 'value' is meant to
already 'unblock' for that amount of Wait calls.
Signed-off-by: Andreas Pape <apape@de.adit-jv.com>
This fixes path relocation in mingw environment. Without this,
libdir and includedir are not shown in pkgconfig output. e.g.
* Without predefined variables:
- pkgconf -cflags jack: No output
- pkgconf -libs jack: -ljack64
* With predefined variables:
- pkgconf -cflags jack: -IC:/msys64/mingw64/include
- pkgconf -libs jack: -LC:/msys64/mingw64/lib -ljack64
Also official documentation suggests to use variables
https://people.freedesktop.org/~dbn/pkg-config-guide.html
Unbreak the build with Clang on architectures where JACK uses non-packed
data structures, like arm64 or powerpc. The alignment errors are exposed
there because:
* The non-packed data structures require 8 byte alignment.
* alignas() is not allowed to weaken alignment requirements to 4 bytes.
* Clang enforces this according to standard, GCC ignores it.
Use an additional alignas() specifier to let the compiler choose between
minimum alignment (packed) and "natural" alignment (non-packed). This is
both standard c++11 and compatible with older GCC, which does not
propagate alignment requirements of packed substructures properly.
The function pointers jack_error_callback and jack_info_callback are
offered by the jack.h header as non-weak API members, but they were not
exported to the jack library, only to the jackserver library.
This broke the Jack backend of the OpenAl Soft library when switching
from Jack1 to Jack2.
* apply changes without whitespace
* remove neon intrinsics and fix indentation
* update float_32 macro and fix misspellings
* check msbits to determine number of bits in alsa driver
* add better error messages and support for SND_PCM_FORMAT_S32_BE
* log when sample format is not equal to bits
Co-authored-by: Claudio Cabral <clca@bang-olufsen.dk>
Co-authored-by: Claudio Cabral <cl@udio.co>
Since doxygen 1.8.16, opening and closing a group must not be done as
C comment but as doxygen command. In other words, not one but two
asterisk characters are required so that doxygen finds a group.
Apparently the ${HOME} variable is set to the filesystem root "/" in
Cirrus CI FreeBSD instances. Just create an installation directory
without it, then.
While here, set --pkgconfigdir to closely mimick the build in the
FreeBSD ports tree.
When the github application Cirrus CI (https://cirrus-ci.org/) is
installed, this build description file adds FreeBSD build checks to
changes and PRs in github.
There are four build tasks currently, a minimal build and one with all
options enabled on two different FreeBSD versions.
* Move jack_control to dbus dir
dbus/jack_control:
The `jack_control` script is dbus specific and not part of the original
jack tools. As the files offered by jack-example-tools are now
optionally not built, the script needs to be made available from a
location, that is not ignored when omitting the build of
jack-example-tools files.
* Move installation of jack_control to dbus integration
dbus/wscript:
Install `jack_control` script if building/installing jackdbus.
tools/wscript:
Remove (unconditional) installation of `jack_control` script.
wscript:
In 61a708f2c6 a regression has been
introduced, that always leads to not building the jack-example-tools
(even if selected).
This has been introduced due to the use of the wrong configuration
environment `HAVE_JACK_EXAMPLE_TOOLS`, whereas it should have been
`BUILD_JACK_EXAMPLE_TOOLS`.
dbus/jackdbus.c:
Rely on the `JACK_VERSION` define instead of `SVN_VERSION` (included
from svnversion.h).
dbus/wscript:
Add the `JACK_VERSION` define based on `JACK_VERSION` configuration.
wscript:
Remove all code related to the use of `svnversion.h` and
`svnversion_regenerate.sh`.
wscript:
Add option `--example-tools` to allow optional build of executables and
libraries provided by jack-example-tools (defaults to True).
It can be used as `--example-tools=yes|no` or `--no-example-tools` or
plain `--example-tools`.
Based on the new option, set the configuration environment variable
`HAVE_JACK_EXAMPLE_TOOLS` which is used throughout the configuration
and build steps to include the `example-clients`, `tools` and `tests`
subdirectories.
man/wscript:
Provide the `HAVE_JACK_EXAMPLE_TOOLS` build environment variable to the
`fill_template` script as second argument.
Remove unused imports.
man/fill_template:
Change the behavior of the script to only create all man pages if the
second argument to the script is `True` (the jack-example-tools are
being built), else only create the man page for jackd.
jack.pc.in:
Add the custom `jack_implementation=jack2` pkgconfig variable to the
generated jack.pc file to be able to distinguish jack implementations.
As jack implementations exist with jack1, jack2 and pipewire-jack, it is
not (easily) possible to distinguish them by looking at the version
alone (particularly the case with jack2 vs. pipewire-jack, as they share
the same headers).
This is a no-op since the line was already commented out, to make it
compile on FreeBSD. But it deserves an explanation:
The _POSIX_C_SOURCE macro is meant to restrict the C library to a
certain POSIX standard, not to enable features. This is inappropriate
here because:
1. Jack already uses non-POSIX functions. E.g. JackPosixSemaphore.cpp
references gettimeofday(), which is part of the X/Open specs.
2. C++ does not define a POSIX level to be based on. Headers from the
C++ standard library may (and do) break when the POSIX feature level
is restricted.
The canonical way is to only set the feature level through the
"--std=gnu++11" compile options.
Features:
* Internal workings more in line with other Jack drivers.
* Use poll() for wait and sync instead of blocking I/O.
* Allows to use Jack in "async" mode.
* Calculate DSP usage correctly.
* OSS buffer management to achieve stable latencies.
* Latency correction for asymmetric OSS buffer use.
* More robust handling of over- and underruns.
* Handle format changes forced by the OSS interface.
* FreeBSD 24bit samples are always packed.
No changes to the driver parameters or the user interface.