Commit Graph
550 Commits
Author SHA1 Message Date
Mike Brady 42bd29d6da This is version 5.2 2026-07-28 17:15:07 +01:00
Mike Brady df59fa80ab This is 5.2-dev 2026-07-04 12:07:10 +01:00
Mike Brady c454867a04 Merge branch 'development' 2026-06-22 11:54:59 +01:00
Mike Brady efd93c5a54 5.1-dev 2026-05-18 10:29:08 +01:00
Mike Brady f30dd7aee6 Enhancements
Enable the AirPlay 2 build to operate an optional classic-AirPlay-only service or to gracefully degrade to classic AirPlay, as follows:
  1. Add a new command-line option '-—service-type=<type>' and an equivalent configuration entry 'service_type = "<type>"' in the 'general' section of the configuration file,
     where <type> can be "auto", "classic" or "airplay2":
      1. "auto" (default) means that the service will be AirPlay 2 if NQPTP is running. If NQPTP is not running, classic AirPlay service will be provided instead, and in that case,
      "(Classic)" will be appended to the default AirPlay service name visible to AirPlay clients like Apple Music, for example "RaspberryPi3B (Classic)".
      2. "classic" means the service will be classic AirPlay (aka AirPlay 1).
      3. "airplay2" means the service will be the modern AirPlay 2. In this case, as distinct from "auto", if NQPTP is not running, Shairport Sync will log an error and terminate.
  2. In the systemd service file, NQPTP is now a "Want" rather than a "Require". If it's present, then it will be launched before Shairport Sync. If it's absent, Shairport Sync will launch anyway.
  3. Improve the delivery of input format changes and emit 'sdsc' metadata when changes occur.
  4. Emit new format information in the log if statistics is enabled.

Docker Changes
  1. Support for linux/arm/v6 has been dropped, as Docker is no longer supported.
  2. NQPTP is not started in the AirPlay 2 Docker image if '--service-type=classic' or '--service-type=airplay1' is in the command line options at the end of the docker run command.
     The purpose is to ensure that ports 319 and 320 are left alone when the AirPlay 2 image is set to provide Classic service only.
     Note that setting the configuration file 'service_type' to 'classic' will not prevent NQPTP from starting up -- you must use the command line option.
  3. A new "dev" target has been added. It is a large image containing the custom-built FFmpeg library, NQPTP, Avahi and D-Bus along with the Shairport Sync source and
     all necessary development tools. When started, Avahi, D-Bus and NQPTP are all installed and running. The bash shell has also been added and is entered.

Stability Improvements
  Reorganise session preemption to fully terminate the existing session before starting a new one.
  Don't delay closing the event port to wait for it to be closed at the client end.
  Add a safe_socket_close() function to ensure sockets are fully closed. Use -1 to designate closed rather than 0, to prevent attempts to reclose sockets, causing mayhem.
  Re-order FFmpeg decommissioning during teardown.
2026-05-18 09:57:12 +01:00
Mike Brady 41a5cee654 5.0.5-dev 2026-04-27 13:18:57 +01:00
Mike Brady eed1b9f0b9 Fix missing configuration mapping parameter in PulseAudio backend initialisation. 2026-04-27 12:43:51 +01:00
Mike Brady 11052b7896 Lot of changes here.
1. check_classic_mac_basic.yml — update to latest macOS-latest
2. docker-on-push-tag-or-pr — dependant updates
3. FFTConvolver — fix a compilation warning when the DEBUG flag is turned off
4. Reorganise some source files — e.g. move most of the metadata stuff into a subdirectory
5. Remove unused special-purpose AirPlay 2 RC event handler.
6. Reorganise source files and source code relating to the standard event handler.
7. Check configuration settings a little more carefully to offer more meaningful diagnostics.
8. Add password to AirPlay 2 and reorganise initialisation to set AirPlay 2 flags accordingly.  Also, remove redundant airplay_pin.
9. Remove redundant debug facility definitions from common.h
10. Make it possible to omit all the dacp stuff from a build.
11. Make it possible to omit metadata multicast from a build.
12. Add AP2-native metadata by setting bit 50 of features to true.
13. Improve stability when pre-empting an existing play session.
14. Fix a few compiler warnings in the pair_ap library.
15. Ensure that the audio format is known before starting synchronisation.
16. Improve handle_configure to set/clear a new config setting. Doesn’t seem to do anything…
17. Experimentally turn off bit 46 of AirPlay 2 features — seems to stop failing pair-verify attempts.
2026-04-26 10:23:18 +01:00
Mike Brady 6ef48e59e6 5.0.3 2026-04-25 11:22:18 +01:00
Mike Brady 2474037b0c 5.0.3-dev and add some diagnostics around a pesky fault condition. 2026-04-08 13:56:23 +01:00
Mike Brady f784e463e4 Don't allow the Apple ALAC decoder to be included in an AirPlay 2 build. [skip ci] 2026-04-06 16:36:57 +01:00
Mike BradyandGitHub 6729802d6f Merge pull request #2174 from mikelei8291/fix-systemd [skip ci]
Fix `systemd` unit options -- require NQPTP to be present and running before starting the AirPlay 2 build of Shairport Sync.

Many thanks!
2026-04-06 13:11:40 +01:00
Mike Brady 0b0ffcc04b Remove an requirement for libuuid for FFmpeg and update some carelessly reused AirPlay 2 error messages to refer to FFmpeg. [skip ci] 2026-04-06 12:39:50 +01:00
Mike Brady 28eb383155 Fix a D-Bus Test Client compilation bug; turn off lots of less relevant debug messages; change how blocks of audio very far in the future are handled; add pw=true to the Bonjour information for classic AirPlay when built for AirPlay 2. 2026-03-28 18:42:12 +00:00
Mike Lei e41d52dad1 fix: add missing nqptp.service to systemd After and Requires options when building for Airplay 2 2026-03-28 03:14:55 +08:00
Mike Lei 7722a0e7bd fix: avoid leading space in systemd unit option values 2026-03-28 03:14:45 +08:00
Mike Brady 8aa70695a2 5.0.1+ real beginning 2026-02-27 15:26:53 +00:00
Mike Brady 3e22a80371 Beginning 5.0.1-post 2026-02-27 15:17:22 +00:00
Mike BradyandGitHub dc4c334adf Update version number to 5.0.1 in configure.ac [skip ci] 2026-02-27 15:15:10 +00:00
Mike Brady 3888999dc4 Remove requirement for the mosquitto service to be running when built with the --with-mqtt-client flag. 2026-02-17 09:01:28 +00:00
Mike Brady d6275eafef Bring some changes in from V5.0 release. Start using 'post-dev' to avoid ambiguity. 2026-02-14 12:23:46 +00:00
Mike Brady 15a0c6b1e3 RC0 [skip ci] 2026-02-13 15:46:37 +00:00
Mike Brady b405c0b896 Version 5.0 Major Release.
New Features:
Multi-Channel and High-Resolution Audio Support
48,000 frames per second ("48k") operation.
48k lossless stereo support.
5.1 and 7.1 surround sound support.
Multi-channel and multi-rate operation on ALSA, PipeWire, PulseAudio, FreeBSD, stdout and Unix pipe output backends.
Automatic Audio Format Selection
Flexible and controllable output format selection.
Automatic rate, sample format, and channel count selection.
Full FFmpeg Integration
Support for transcoding.
Advanced resampling capabilities.
New audio format support.
Enhanced Resampling
New vernier resampling and interpolation method optimized for low-power CPUs.
Better performance on resource-constrained devices.

Convolution and Loudness Enhancements:
Convolution system is now multithreaded and works on stereo and multichannel audio at 48k and 44.1k.
Multiple impulse response (IR) files can now be provided via convolution_ir_files setting.
New convolution_thread_pool_size setting for multithreaded processing (defaults to 1).
Loudness processing now works with stereo and multichannel audio at 48k and 44.1k.
Updated to the most recent HiFi-LoFi FFT convolver.

MQTT Enhancements:
Added new publish_retain boolean option. When enabled, published MQTT messages have the retain flag set, so the MQTT broker stores the last message per topic and new subscribers receive the most recent value immediately. Thanks to lululombard for PR #2142.

D-Bus Enhancements:
Added new dbus_default_message_bus command-line argument (can be system or session) to set the default message bus for both D-Bus native service and MPRIS service.

Performance Improvements:
Enhanced compatibility with AirPlay 2 AutoMix and Smart Tracklists resulting in less unexplained track skipping.
Better operation on low-power devices down to Raspberry Pi B.
Improved efficiency on embedded systems.
Enhanced timestamp handling for better synchronization.
Improved sync error calculation.
Rebuilt buffered audio processor for cleaner handling of immediate and deferred flush requests.

Docker Enhancements:
Reduced Docker image sizes with slimmed-down FFmpeg library.
Removed dhclient from Docker images for smaller footprint.

Bug Fixes:
Fixed MQTT warning on service startup: "Could not establish a mqtt connection". The startup script now correctly states that the mosquitto service is required. Thanks to Hugo Villeneuve for PR #2137.
Fixed compatibility with mbedtls library version 3.4+ (present on recent Linux versions). Thanks to Christian Beier for finding and fixing the bug.
Fixed PulseAudio backend so that PA_ERR_NODATA returns "No latency data yet". Thanks to Vladimir Shakov for the report and fix.
Ensured old flush requests are deleted when a new play session starts. Thanks to saujanyashah for the report.
Fixed format warnings on 64-bit and 32-bit systems
Removed compilation warnings on 32-bit builds
Improved argument checking for debug(), inform(), warn() and die() functions
Fixed "daemon" typos throughout codebase. Thanks to Chris Boot for PR #1981.
Added warning if a convolution impulse response file cannot be read due to bad path or permissions

Build System Improvements:
Unified service file with variable substitution for Avahi support, making it easier to add future service dependencies. Thanks to Hugo Villeneuve.
Network interface selection now only considers interfaces that are up, running and not loopback interfaces. Thanks to Carl Johnson for the suggestion.
Configuration File Changes and Deprecations

New settings: convolution_ir_files (replaces convolution_ir_file), convolution_enabled (replaces convolution), convolution_max_length_in_seconds (replaces convolution_max_length), loudness_enabled (replaces loudness).
New convolution_thread_pool_size setting (defaults to 1).
Deprecated settings: convolution_ir_file, convolution, convolution_max_length, loudness.
Corresponding D-Bus methods and properties have been updated.

Deprecation Notice:
The Jack Audio and soundio backends are deprecated and will be removed in a future release. Consider using the updated PipeWire backend instead.

Documentation Updates
Updated BUILD.md with latest build instructions.
Updated AIRPLAY2.md with feature information.
Enhanced convolution and loudness documentation.

Maintenance:
Fixed FFmpeg deprecation warnings.
Bumped actions/checkout from 6.0.1 to 6.0.2.
Bumped docker/login-action from 3.6.0 to 3.7.0.
Bumped docker/build-push-action from 6.13.0 to 6.15.0.
Bumped docker/setup-qemu-action from 3.4.0 to 3.6.0.
Bumped docker/setup-buildx-action from 3.9.0 to 3.10.0.
2026-02-13 15:17:40 +00:00
Hugo VilleneuveandHugo Villeneuve b60b424495 MQTT: fix warning when starting service
This fixes the following warning:

    shairport-sync[293]: [MQTT]: Could not establish a mqtt connection

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
2026-01-26 10:24:22 -05:00
Hugo VilleneuveandHugo Villeneuve 6a94eeb926 Use common service file for avahi
Use variable substitution to simplify service file for optional avahi.

This will also help to simplify adding future service dependencies.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
2026-01-26 10:24:22 -05:00
Mike Brady d043f98330 Update the convolution code:
(1) to be multithreaded,
    (2) to work on multichannel audio and
    (3) to work on 48k and 44.1k audio.

    Allow multiple impulse response (IR) files with a new setting: "convolution_ir_files"
    When convolution starts, Shairport Sync will look for an IR file with a sample rate
    matching the input (44.1k or 48k) and channel count.
    If one can't be found, it will look for a single-channel IR file with the same rate.
    It will always choose the first match in the file list supplied "convolution_ir_files".

    Allow multithreading -- use the "convolution_thread_pool_size" to set the number of threads to use.

    Deprecate "convolution" -- use "convolution_enabled" instead.
    Deprecate "convolution_max_length" -- use "convolution_max_length_in_seconds" instead.
    Deprecate "convolution_ir_file" -- use "convolution_ir_files" instead.
    Update corresponding D-Bus methods and properties.

Update the loudness code to work on 48k and well as 44.1k audio and with multichannel audio.

    Deprecate "loudness" -- use "loudness_enabled" instead.
    Update corresponding D-Bus methods and properties.

Fix a deprecated FFmpeg warning.

Update HiFi-LoFi FFT convolver to latest available.
2025-10-13 13:26:20 +01:00
Mike Brady 60143518c2 This squashed commit comprises a long series of improvements, bug fixes, optimizations, and new feature additions:
- 48,000 frames per second operation,
 - 48k lossless stereo, 5.1 and 7.1 surround sound
 - Multichannel and multi rate operation on ALSA, PipeWire, PulseAudio, FreeBSD, stdout and unix pipe output backends.

Automatic, flexible and controllable output format (rate, sample format and channel count) selection.

Full FFmpeg integration to support transcoding, resampling, and new audio formats.

Better operation on lower powered devices down to e.g. Raspberry Pi B.

Reduced Docker image sizes with a slimmed-down FFmpeg library.

Enhanced timestamp handling for better synchronization.

Improved the sync error calculation.

A new "vernier" resampling and interpolation method for low-power CPUs.

Bug fixes and minor enhancements.

Note -- there are many breaking changes from previous versions of Shairport Sync!
2025-02-23 13:31:17 +00:00
Mike Brady b08e6adce4 Merge branch 'development'
Update Dockerfile and classic Dockerfile and update github workflows.
2025-01-31 14:01:17 +00:00
Mike Brady b315ba1c94 start of 4.3.7-dev 2025-01-27 14:31:17 +00:00
Mike Brady 046b598513 4.3.6 2025-01-27 14:26:59 +00:00
Mike Brady 409397d354 4.3.6-dev 2024-12-02 13:00:26 +00:00
Mike Brady a92df98fad 4.3.5 master version 2024-12-02 12:41:11 +00:00
Mike Brady d8442c1afc Fix error that prevented the libsoundio library from being used at all, duh. 2024-11-28 15:21:54 +00:00
Mike Brady 758648a5a4 Deprecate the soundio backend. Nobody seems to use it, and as it stands it can't be much use. It would be nice to be wrong about this. 2024-11-28 14:44:30 +00:00
Mike Brady 9809f9d4be 4.3.5 starting point 2024-07-06 12:09:08 +01:00
Mike Brady 6ab794297b Merge branch 'development'
Limit the maximum number of open file handles in Docker images.
Increase the level of optimisation (to -O3) while building the Shairport Sync application itself.
Enabled termination of a disconnected session in AirPlay 2 operation after a timeout, which was disabled by default.
Fixed a bug that prevented Shairport Sync from terminating cleanly when a fatal error that occurred while directly accessing the alsa output device.
Fixed a bug that prevented Shairport Sync from recovering cleanly if a player disconnected without warning. The problem was that the player thread would not respond to cancel request. Fixed by moving a pthreadtestcancel() call to the innermost loop.
Fixed compilation errors on old versions of Mac OS X by, reordering some of the files to be included in shairport.c.
Avoided using TCP_KEEPINTVL and TCP_KEEPCNT if they are not defined (they are not defined in older versions of Mac OS X).
Fixed a race condition with the metadata queues. The problem was that the queues were being initialised by threads launched by the main thread which, having started the threads, proceeded to use the queues. But if the threads were late in starting, the queues might not be initialised by the time the main thread tried to use them. Fixed by initialising the queues in the main thread.
Enable the ALSA backend to access mixers on a devices with a hdmi: prefix.
Update the help text for the ALSA backend to denote HDMI devices using the hdmi: prefix rather than hw:.
Manage thread cancellation state explicitly in audio_ao.c
CAR INSTALL guide: Simplify some of the wording. Change order and allow a few seconds before starting systemd-timesync service.
2024-07-06 11:46:14 +01:00
Mike Brady c945f3a9ea 4.3.4-dev start 2024-05-29 15:29:22 +01:00
Mike Brady 28ae1dae85 Merge branch 'development'
This is 4.3.3 release.
2024-05-29 15:17:59 +01:00
Mike Brady be74e3e171 Add some extra CFLAG settings to configure.ac for libconfig libpopt and openssl/libcrypto to enable compilation on macOS without extra flag settings. 2024-04-25 15:08:50 +01:00
Mike Brady 85f8ea12dd Use PKG_CHECK_MODULES to find the ao lib if possible. 2024-04-25 10:27:26 +01:00
Hugo Villeneuve 2dfeaa6825 Add configure option to enable/disable creation of user/group
Useful for Yocto, for example, where groupadd or getenv is not available.

Enabled by default, to keep same behavior as before.
2024-03-07 00:20:39 -05:00
Mike Brady 9ab85989f3 A bit late, but tag this as 4.3.3-dev. Also merge in the commit history of the master branch. 2023-10-30 17:46:12 +00:00
Mike Brady 2ed5d998fb Merge branch 'development'
Update to 4.3.2
**Enhancements**
* A totally new PipeWire backend featuring full synchronisation.

**Bug Fixes**
* Stability improvements for the PulseAudio backend.
* Fix a crash when the Avahi subsystem became disconnected. This is normally a rare occurrence, but Shairport Sync was not dereferencing obsolete data correctly when it happened.
* Set and reset Bonjour flags correctly when it's a Classic Airplay session in AirPlay 2 operation.
* Fix a number of FreeBSD compilation errors and warnings.
* Fix various errors when breaking into an existing session to terminate it. Thanks again to [aaronk6](https://github.com/aaronk6).
* Fix some debug message errors, sigh. Thanks to [Nathan Gray](https://github.com/n8gray).
2023-10-15 18:42:38 +01:00
Mike Brady 2edc6a04c3 bump version number 2023-09-19 12:00:43 +01:00
Mike Brady a1b0121941 Fix a bug that prevented Shairport Sync being added to Home. 2023-09-17 15:24:42 +01:00
Mike Brady e6a2a42961 update/correct configure.ac version info 2023-09-17 15:22:15 +01:00
Mike Brady 8372092177 Actually make 4.2.1 4.3, since there have been enhancements. 2023-09-16 18:50:41 +01:00
Mike Brady 12daaaf380 Merge updates from the development branch into the master branch as 4.2.1 2023-09-16 18:20:12 +01:00
sternenseemann 9f8b360c63 configure.ac: check $AR for ar to use
Resolves #1705. Tested against https://github.com/NixOS/nixpkgs/pull/242350.
2023-07-09 21:16:09 +02:00
Mike Brady eef6198639 Bump configure.ac version number... 2023-06-05 14:42:34 +01:00