Commit Graph

4071 Commits

Author SHA1 Message Date
Florian Walpen 886b35c3bd JackPosixProcessSync: Fix mutex owner on TimedWait() timeout.
Per POSIX definition, pthread_cond_timedwait() re-acquires the mutex
when a timeout occurs and ETIMEDOUT is returned. In that case also
mark the waiting thread as owner again, for consistency.
Otherwise subsequent attempts to unlock the mutex will fail, leaving
the mutex locked forever.
2023-12-09 20:32:37 +01:00
Florian Walpen f14409bb92
CI: Update FreeBSD images to 13.2-RELEASE and 14.0-RELEASE. 2023-12-09 15:21:22 +01:00
falkTX 806da09a12
Allow portaudio driver on any system, use device reservation too
Signed-off-by: falkTX <falktx@falktx.com>
2023-12-03 12:29:07 +01:00
falkTX 7d08d7f24e
Add to last commit, make use of HAVE_DBUS_1
Signed-off-by: falkTX <falktx@falktx.com>
2023-12-03 12:27:49 +01:00
falkTX 0dc60f526c
Add 'libdbus' option for classic builds with device reservation
Signed-off-by: falkTX <falktx@falktx.com>
2023-12-03 11:24:56 +01:00
falkTX 0d730dd356
Fix crash on windows 64bit when receiving winmme MIDI messages
Signed-off-by: falkTX <falktx@falktx.com>
2023-10-28 14:35:08 +02:00
falkTX 73a759b082
Make jack_get_descriptor internal client message a verbose log
Signed-off-by: falkTX <falktx@falktx.com>
2023-10-27 14:11:48 +02:00
falkTX 171ec33b58
Define metadata APIs on libjackserver too
Signed-off-by: falkTX <falktx@falktx.com>
2023-10-27 14:11:01 +02:00
Nils Philippsen 250420381b Update to waf 2.0.26
This makes waf compatible with Python 3.12 again.

Also, apply modifications needed for MacOS and add as a patch file (see
commits 0f2e3b2 and dc6c995).

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2023-08-29 17:08:30 +01:00
Albert Graef b83d2340a5
Jack MIDI portnames (fixes #944) (#945)
* Rework the seqmidi aliases.

- The 1st alias is now the Jack1 MIDI port name with alsa_midi prefix.

- This 2nd alias is basically the same as the 1st alias with the
  alsa_midi prefix stripped, so that devices are listed under the ALSA
  names.

Also fixed the "capture" and "playback" port type names which were the
wrong way round.

* Rework the rawmidi alias.

Like in alsa_seqmidi.c, the 1st alias is now the Jack1 MIDI port name
with alsa_midi prefix.

* Rework pretty-name metadata.

The rawmidi and seqmidi pretty-name metadata now uses the same Jack1
port name as the 1st alias, without the alsa_midi: prefix.
2023-08-29 16:07:54 +02:00
falkTX f4da9d25ca
Fix man/fill_template for waf clean
Signed-off-by: falkTX <falktx@falktx.com>
2023-08-29 15:56:29 +02:00
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