Commit Graph

4060 Commits

Author SHA1 Message Date
Filipe Coelho b93a1d8236
Cleanup and rework CI setup (#942)
* rework and cleanup CI setup

Signed-off-by: falkTX <falktx@falktx.com>

* continue CI cleanup

Signed-off-by: falkTX <falktx@falktx.com>

* Only use --mixed for win64

Signed-off-by: falkTX <falktx@falktx.com>

---------

Signed-off-by: falkTX <falktx@falktx.com>
2023-07-04 14:55:12 +02:00
falkTX 39521b4dc8
Do not require rosetta for generated macOS packages
Signed-off-by: falkTX <falktx@falktx.com>
2023-07-04 13:53:08 +02:00
Stephane Letz 520dfa0ac5 Relicence of JackControlAPI.h and control.h after discussion with Nedko Arnaudov. 2023-06-04 11:48:54 +02:00
falkTX 4f58969432
Update changelog
Signed-off-by: falkTX <falktx@falktx.com>
2023-02-02 12:04:10 +01:00
falkTX 1eff44a212 Update copyright year
Signed-off-by: falkTX <falktx@falktx.com>
2023-01-30 22:14:29 +01:00
falkTX f5a01999fa macOS: forcely ignore wait failures when closing down
Signed-off-by: falkTX <falktx@falktx.com>
2023-01-30 22:14:29 +01:00
Christian Clauss d2d44158f9
Upgrade GitHub Actions (#911)
* Upgrade GitHub Actions

* https://github.com/actions/cache/releases
* https://github.com/actions/checkout/releases
* https://github.com/actions/upload-artifact/releases

* Upgrade GitHub Actions
2023-01-29 17:54:29 +01:00
falkTX 79ea0746fa
macOS: killing a thread will abort the semaphore wait
Signed-off-by: falkTX <falktx@falktx.com>
2023-01-29 12:57:36 +01:00
luz paz ae9993bb34 Fix typos 2023-01-28 16:48:31 +01:00
Daan De Meyer 328c58967d Remove usage of 'U' mode bit for opening files in python
The 'U' mode bit is removed in python 3.11. It has been
deprecated for a long time. The 'U' mode bit has no effect
so this change doesn't change any behavior.

See https://docs.python.org/3.11/whatsnew/3.11.html#changes-in-the-python-api
2023-01-28 16:40:13 +01:00
K 75516ffe6d
Fix ringbuffer thread safety on ARM. Fix #715 #388 (#886)
* fix ringbuffer thread safety on ARM. fix #715 #388

This patch addresses the thread safety problem of `jack_ringbuffer_t`
mentioned in #715 and #388. The overbound read bug caused by this problem
is impossible to reproduce on x86 due to its strong memory ordering, but
it is a problem on ARM and other weakly ordered architectures.

Basically, the main problem is that, on a weakly ordered architecture,
it is possible that the pointer increment after `memcpy` becomes visible
to the other thread before `memcpy` finishes:

	memcpy (&(rb->buf[rb->write_ptr]), src, n1);
	// vvv can be visible to reading thread before memcpy finishes
	rb->write_ptr = (rb->write_ptr + n1) & rb->size_mask;

If this happens, the other thread can read the remaining garbage values
in `rb->buf` due to be overwritten by the unfinished `memcpy`.

To fix this, an explicit pair of release/acquire memory fences [1] is
used to ensure the copy on the other thread *happens after* the `memcpy`
finishes so no garbage values can be read.

[1]: https://preshing.com/20130922/acquire-and-release-fences/

* remove volatile qualifier on ringbuf r/w pointers

The volatile constraints are excess when compiler barriers are present.
It generates unnecessary `mov` instructions when pointers aren't going
to be updated.

* simplify read/write space calculations

This optimization is possible because the buffer size is always a power
of 2. See [1] for details.

[1]: https://github.com/drobilla/zix/pull/1#issuecomment-1212687196

* move acq fences to separate lines
2023-01-28 16:38:05 +01:00
Florian Walpen f18660aa03
CI: Update FreeBSD image to 13.1, fix build.
In principle, major FreeBSD versions should be ABI compatible.
But in this case the python3 binary would only run on 13.1, not 13.0.
2023-01-26 23:20:24 +01:00
Filipe Coelho 99e5d115ea
Update link to new-session-manager jackaudio page 2022-08-14 23:23:54 +01:00
falkTX d732afcb38
Fix win32 CI builds
Signed-off-by: falkTX <falktx@falktx.com>
2022-07-22 00:41:32 +01:00
Florian Walpen 819f46147e
FreeBSD: Override UpdateLatencies() to fit OSS latencies.
Reduce the base latencies for capture and playback by half a period,
and let the update method account for the additional playback latency
introduced by OSS buffer management.
This fits actual OSS latencies better, so the same settings for the
extra input-latency and output-latency parameters should apply to
different period lengths.

Beware that this change invalidates current input-latency and
output-latency values, they have to be measured again.
2022-05-30 01:22:54 +02:00
Florian Walpen c699e0cfe0
CI: Fix FreeBSD build, remove --example-tools option. 2022-05-05 10:30:14 +02:00
falkTX d2bd4feed3
Do not ship tools in automated Windows CI builds
Signed-off-by: falkTX <falktx@falktx.com>
2022-05-04 12:02:55 +01:00
falkTX 30bde7653e
Clear CI cache for fresh builds
Signed-off-by: falkTX <falktx@falktx.com>
2022-05-04 11:51:02 +01:00
falkTX 9267f9c61f
Bump version and update changelog
Signed-off-by: falkTX <falktx@falktx.com>
2022-05-04 11:26:57 +01:00
falkTX a0b3e3e4dd
Remove readline as dependency
Signed-off-by: falkTX <falktx@falktx.com>
2022-05-04 11:23:31 +01:00
falkTX e60daa40a8
comment out ubuntu-20.04 CI build for now
Signed-off-by: falkTX <falktx@falktx.com>
2022-05-04 11:21:52 +01:00
falkTX fb5da39783
Remove zita dependencies
Signed-off-by: falkTX <falktx@falktx.com>
2022-05-04 11:21:33 +01:00
falkTX c69d6097c2
sndfile is no longer a dependency
Signed-off-by: falkTX <falktx@falktx.com>
2022-05-04 11:20:37 +01:00
falkTX 564c710eef
Remove example-clients and tools
Signed-off-by: falkTX <falktx@falktx.com>
2022-05-04 11:19:06 +01:00
falkTX 3d5ace462f Do not install qttools5-dev-tools for win32/64 CI builds
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-22 16:23:44 +01:00
falkTX 0f535e3d2c
IRC has moved to Libera Chat a while ago
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-16 11:25:26 +01:00
falkTX 1abd04edab
Fix typo for packaging
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-15 20:34:48 +01:00
falkTX 6b3c96d8ae
Merge branch 'master' into develop
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-15 20:14:06 +01:00
falkTX 82ec942605
Update changelog
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-15 20:09:19 +01:00
falkTX 45042beac5 Make JackMachSemaphore more robust, dont use thread_terminate
Fixes #841
2022-04-15 20:02:58 +01:00
David Runge 5aa5861af0 Fix jack_control for flake8 compatibility
dbus/jack_control:
Remove unused imports for os and traceback.print_exc.
Fix indentation, whitespace and line length issues across the entire
file.
Simplify printing in `print_help()` by calling `print()` only once.
2022-04-13 22:57:52 +01:00
David Runge b5ca229866 Run flake8 on all wscript files and on jack_control
.github/workflows/lint.yml:
Ensure that flake8 in CI is run on all wscript files and on
jack_control.
2022-04-13 22:57:52 +01:00
falkTX 88102ec4a7
Bump version to 1.9.21
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-13 19:02:09 +01:00
falkTX ac00dee3ae
Fix ubuntu-20.04 CI test
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-13 18:44:24 +01:00
falkTX fc82bfc572 Update changelog
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-13 18:44:07 +01:00
nick87720z 3a19b628f8
jack_control - shell mode and update (#821)
* jack_control: move to tools for a while

* jack_control: shell mode command

This command runs loop, which executes commands from stdin until EOF
(Ctrl+D in terminal). Command status is printed to stdout.

* jack_control: optimize some functions

* jack_control: unused function

* jack_control: more informative message about dbus typesig error

* jack_control: Fix shell mode I/O

* restore jack_control path
2022-04-13 18:31:49 +01:00
David Runge aa27576236
Fix wscripts syntax (#826)
* Add flake8 configuration

.flake8:
Add flake8 configuration that limits the line length to 120 chars and
outputs to flake8.txt

* Add flake8.txt to gitignore

.gitignore:
Add flake8.txt (flake8 output file) to ignore.

* Syntax fixes and cleanup for top-level wscript

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.

* Fix common/wscript syntax

common/wscript:
Fix syntax problems, unneeded imports and break lines at 120 chars.

* Fix compat/alloca/wscript syntax

compat/alloca/wscript:
Fix compat/alloca/wscript syntax

* Fix compat/wscript syntax

compat/wscript:
Fix compat/wscript syntax

* Fix dbus/wscript syntax

dbus/wscript:
Fix syntax and break lintes at 120 chars.

* Fix example-clients/wscript syntax

example-clients/wscript:
Fix syntax and remove commented code.

* Fix tests/wscript syntax

tests/wscript:
Fix syntax and commented code.

* Fix tools/wscript syntax

tools/wscript:
Fix tools/wscript syntax.

* Add github workflow for linting wscripts

.github/workflows/lint.yml:
Add github workflow for linting wscripts using findutils and flake8.

* Fix project version extraction in CI

.github/workflows/build.yml:
Adapt the project version extraction in CI to the syntax changes in
the top-level wscript.
2022-04-13 18:29:29 +01:00
Be cceca54255
fix JackWeakAPI on Windows (#846)
* JackWeakAPI: fix DLL loading on Windows

LoadLibrary takes a LPCWSTR (UTF16). LoadLibraryA is needed to
work with ASCII C string literals.

* JackWeakAPI: call tryload_libjack if it hasn't been called already

On non-Windows tryload_libjack is loaded on startup with
__attribute__((constructor)) but with MSVC, Microsoft documentation
says to not load libraries in a DLL's initialization function:
https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-best-practices

* JackWeakAPI: add debugging message for Windows
2022-04-13 18:25:47 +01:00
falkTX 84d80c0a8c
Make sure CI builds do not use LTO
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-13 17:43:16 +01:00
falkTX 61f0d4accb
Update changelog, fixup for CI builds
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-13 17:38:08 +01:00
falkTX c9d8173d27
Make example-tools off by default
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-13 17:24:02 +01:00
falkTX 6af0909e1d
Make example-tools off by default
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-13 17:21:30 +01:00
Florian Walpen 4c55ca8be0 Missing check for graph manager in JackAPI.
This seems to be the only place where the result of GetGraphManager() is
not checked for null, at least in JackAPI. Found by llvm scan-build.
2022-04-07 15:20:45 +01:00
Florian Walpen 84a21a8cb9 Bad semaphore allocation in midi_latency_test.
The code did a pointer-sized heap allocation instead of the actual size
of a semaphore struct sem_t. This could result in heap memory corruption
when handling the semaphore.
Found by llvm scan-build.
2022-04-07 15:20:45 +01:00
Florian Walpen d8f59c2f80 Fix bad deallocation in JackMidiAsyncQueue.
The code is only run when other allocations fail, fix it anyway.
This was found by llvm scan-build.
2022-04-07 15:20:45 +01:00
Andreas Pape 58194d90f4 JackFifo: Apply given init value in allocate
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>
2022-03-29 11:49:24 +01:00
Biswapriyo Nath 3a5e040155 pkgconfig: Use predefined variables in Libs and Cflags
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
2022-02-17 18:28:09 +00:00
Florian Walpen 21b293dbc3 Fix alignas() on non-packed architectures (#839).
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.
2022-02-08 18:59:46 +00:00
Alexis Murzeau 3d681a3a99 installer: add qwindowsvistastyle.dll for QJackCtl
This DLL is required to have a proper Qt skin on Windows.
2022-01-27 22:18:21 +00:00
Florian Walpen 37d6369ad3
FreeBSD: Cleanup unused SNDCTL_AUDIOINFO code.
Fixes a scan-build warning about using uninitialized values.
2022-01-22 21:40:40 +01:00