Commit Graph

739 Commits

Author SHA1 Message Date
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
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
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
falkTX 1abd04edab
Fix typo for packaging
Signed-off-by: falkTX <falktx@falktx.com>
2022-04-15 20:34:48 +01:00
falkTX 45042beac5 Make JackMachSemaphore more robust, dont use thread_terminate
Fixes #841
2022-04-15 20:02:58 +01:00
Peter Bridgman 7e599badec macOS: Pass JackMachSemaphore send right via mach_msg IPC (#788)
* macOS: Pass JackMachSemaphore send right via mach_msg IPC

Previously, JackMachSemaphore would communicate the send right for the
semaphore object from the server to a client via a named service
registered via `bootstrap_register`. However, to do this, it would
register the semaphore's port as the service port directly.

In theory this ought to be fine, however in practice, macOS `launchd`,
which provides the `bootstrap_register` interface, does not correctly
detect when such a port becomes dead, and incorrectly believes that the
service that it provides is forever alive, even past the end of the
`jackd` process' (and therefore the semaphore's) existence. This seems
to be *specific* to semaphore ports, as `launchd` is expecting a
standard IPC port, owned by the task, not the kernel. This prevents
`jackd` from later registering another service with the same name, as
`launchd` rejects the registration as conflicting with an active service.

To get around this, `jackd` previously added a counter to the end of the
named service registrations, allowing old services to remain in the
system until the end of the session. To prevent things getting out of
hand, this was capped at 98 service registrations for a given semaphore
name. This led to #784, in which running a client for the 99th time
resulted in the semaphore creation failing and the client failing to
connect.

As `launchd` outlives multiple runs of `jackd`, this situation persisted
across restarts of `jackd`, requiring a restart of the user's session
(i.e. a reboot) to fix.

An initial attempt at fixing this (see #785) tried passing the port
rights directly via shared memory, however mach is too clever for us and
foils that plan by having port names be looked up in a per-task table
(sensible when you think about it).

In this commit, we use mach IPC messages to transfer the send right for
the semaphore from the server to the client. By registering a standard
IPC port with the bootstrap server, the service registrations are
correctly torn down when the ports are destroyed.

It works something like this:

* Server creates IPC port and registers it globally via `bootstrap_register`
* Server listens on IPC port for messages
* Client looks up IPC port via `bootstrap_look_up`
* Client sends it a message
* Server replies with a message containing a send right to the
semaphore's port
* Client is then free to use the semaphore port as before.

This resolves #784.

* Improve error handling

* Add myself to Authors
2022-01-15 15:09:55 +00:00
falkTX cd1efe94fa Allow custom version on macOS generate-pkg script
Signed-off-by: falkTX <falktx@falktx.com>
2022-01-15 15:09:55 +00:00
Colin McEwan dff7fa4fa8
Fix alignment of fields for atomic accesses (#761)
* Assert alignment is suitable for atomic accesses

* Move fields and pad to meet alignment constraints

* Add padding to JackEngineControl to account for inherited data

* Parenthesise padding length for clarity

* Revert "Parenthesise padding length for clarity"

This reverts commit 1f757b9ece5e3b032743c6c5ac49e83c3928e3de.

* Revert "Add padding to JackEngineControl to account for inherited data"

This reverts commit 3d8c7d83ad9483280f623171af7e40ccc76cef38.

* Revert "Move fields and pad to meet alignment constraints"

This reverts commit ff631bbbdc2279df05f3a18dd44e8fd68be2e04d.

* Assure alignment by using 'alignas' on fields
2021-06-30 09:16:28 +01:00
falkTX f3fbc420e4
Remove old useless macOS file 2021-01-09 14:58:12 +00:00
Robert Chin a92df44112 Fixing macOS version API use 2020-12-28 20:33:08 +00:00
falkTX 1a81aa0ee1 Fix build under macOS arm64
Closes #685
2020-12-26 16:59:47 +00:00
Stephane Letz a9c362060b Correct use of Start/Stop return type in JackCoreMidiDriver. 2020-10-03 11:37:40 +02:00
falkTX 34fb7b6963 Cleanup macos package files after generation 2020-07-27 00:27:12 +01:00
falkTX b12e494c6c Fix macos package 2020-07-27 00:25:17 +01:00
falkTX b9e215df96 Reword macos readme package, mention full file list 2020-06-22 22:37:23 +02:00
falkTX 48342bd3d2 Restrict macos semaphore names to 32 chars, fix already-set size 2020-06-15 07:12:26 +02:00
falkTX 69827d12f2 Update osx package text 2020-06-15 06:55:36 +02:00
falkTX d9e4768943 fix previous copy&paste 2020-06-15 06:53:49 +02:00
falkTX 2a4c9f7458 Fixup macos semaphore usage
We now store the real bootstrap name in shared memory,
and use that name to get the semaphore.
This avoid clashes when re-running jack clients, or jack itself.
2020-06-15 06:50:33 +02:00
falkTX dfbbe29a4e Forgot to enable osx pkgbuild after done with tests 2020-06-15 01:11:18 +02:00
falkTX 21169219cf Add macosx package script 2020-06-15 01:07:23 +02:00
falkTX 545a2ac7ca JackMachSemaphore: fix reusage after server crash or device handover 2020-06-13 20:01:18 +02:00
falkTX 91e376cac9 Use macos-specific semaphore under macos
posix version can't be used due to missing sem_timedwait from macos side
2020-06-13 20:00:02 +02:00
falkTX 12156bc11c Remove macos xcode project 2020-06-13 19:58:37 +02:00
falkTX 1024af1c8d Delete macos static binaries and iphone stuff 2020-06-13 19:58:02 +02:00
Luciano Iam a5093f06ca Rename PortSetDeviceMetadata to PortSetDefaultMetadata 2019-10-28 11:24:12 +01:00
luz.paz a93b210134 FIx doxygen and user facing and non-facing typos
Found via `codespell -q 3`
2019-09-11 19:17:07 +01:00
falkTX bb416c7801 Rename `PortSetDeviceName` to `PortSetDeviceMetadata` 2019-09-11 19:13:56 +01:00
Luciano Iam c2ec4b37d4 MIDI port pretty names (#498)
* Set MIDI port pretty names on macOS

* Set MIDI port pretty names on Windows

* Set MIDI port pretty names on Linux/alsarawmidi

* Update alsarawmidi port naming to match CoreMIDI and WinMME

* Rename PortSetPrettyNameProperty to PortSetDeviceName

* Set hardware property to MIDI port names
2019-09-11 19:09:59 +01:00
falkTX 4828349f3d
Prepare for release
Signed-off-by: falkTX <falktx@falktx.com>
2019-05-28 10:55:51 +02:00
shura bb3f5cb296 Solving problems while compiling jack2 on macOS X with dbus support (#434)
* Solving problems while compiling jack2 on macOS X with dbus support

* Using the right function name in uptime error
2019-02-24 18:09:47 +01:00
Thomas Brand 6d2302a803 Remove FreeBoB backend (superseded by FFADO)
The FreeBoB project was renamed to FFADO in 2007.
All users should use the FFADO backend by now (2019).

Backend name to be removed: "freebob"
Alternative backend to use: "firewire"

Please check the jackd manpage for details about "firewire" backend.

This commit is part of legacy cleanup.

closes issue #365.
2019-01-22 20:13:08 +01:00
falkTX 7dfdbe133a
Cleanup some warnings
Signed-off-by: falkTX <falktx@gmail.com>
2018-11-13 23:01:23 +01:00
falkTX 288df203f5 Prepare 1.9.12 release 2017-08-11 14:56:20 +02:00
falkTX f3a6b3e44a 1.9.11-RC1 release 2017-06-13 22:23:24 +02:00
Karl Linden cf48eedf95
Merge branch 'master' into waf-macosx-fixes.
Move aften check to resolve conflict.
2016-03-31 19:40:12 +02:00
Stephane Letz 6fb2dfc080 Update copyright date. 2016-03-18 11:04:56 +01:00
Karl Linden c4f01e5140
Merge branch 'master' into waf-macosx-fixes 2016-02-20 19:34:18 +01:00
Stephane Letz 123de3614f Correct midiseq.c : better use jack_midi_reset_buffer instead of jack_midi_clear_buffer for output port. 2016-02-10 16:48:44 +01:00
Stephane Letz 5e565e684a Merge remote-tracking branch 'upstream/master' 2016-01-01 20:41:05 +01:00
Stephane Letz 02f74a659a String management fix. 2016-01-01 20:40:22 +01:00
ethe 7cb81394ec Fixed building AudioAdapter on OSX 2015-12-19 14:42:42 +00:00
ethe acbe8b11a6 Remember to add Foundation.h to use NS* 2015-12-15 19:59:02 +00:00
ethe 7dbf04ca22 Use mach semaphore rather than posix 2015-12-15 19:40:07 +00:00
ethe ea8e853365 Updated deprecated error handling function 2015-12-15 19:36:53 +00:00
ethe 309025c3fb Renamed OSX C++ files to Objective-C++ files 2015-12-15 19:21:12 +00:00
Karl Linden f37f8dc1c4
Merge branch 'master' into waf-macosx-fixes 2015-12-13 18:15:07 +01:00
Karl Linden 3eec03a64a
Modernize MacTypes.h #includes. 2015-12-13 18:15:03 +01:00
Karl Linden b3d0fcd723
Drop (seemingly) unused and deprecated #include. 2015-12-13 18:15:03 +01:00
Karl Linden aaaeeea8d7
Refactor duplicated code into toplevel wscript. 2015-12-13 18:06:35 +01:00