Commit Graph
74 Commits
Author SHA1 Message Date
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
Mike Brady 1488bf0a34 Remove a misleading comment. 2024-10-31 14:17:29 +00:00
Mike Brady b221e1322d in audio_jack.c, return the delay in terms of frames at Shairport Sync's output rate, not the Jack Audio server's internal rate. 2024-10-31 13:03:23 +00:00
Mike Brady b7d9c22de9 format adjustments 2023-09-11 16:01:38 +01:00
Michiel De Witte ef01dc541e Add missing format string argument 2023-06-20 11:10:54 +02:00
Mike Brady fd880056fb Squashed commit of the following:
Add three parameters to the backend play() function call -- (1) a flag indicating whether the samples are timed or not. If timed, (2) the timestamp and (3) the local time at which the first frame should be heard.
    Update missing pipewire library message.
    Makefile.am fix.
    Update the SHM version and fix the SHM name so that it works with FreeBSD.
    Remove redundant (?) AC_HEADER_STDC check.
    Fix compilation and installation under FreeBSD -- changes to allow building in a separate directory broke the FreeBSD build process.
    Add AC_CHECK_LIB for gcrypt in case PKG_CHECK_MODULES fails to find it.
    Find gcrypt using pkg-config
    Add code to detect when the RTSP channel goes idle for a period, and use it to reset clocks and timings, etc. so that SPS resumes correctly where the source has gone to sleep while playing a realtime stream and has subsequently woken up.
    Don't exit if a UDP Clock Control packet is empty. Also check minimum packet size.
    Remove some very experimental code which may cause memory and port leaks.
    Strip file path from the filename used in debug messages, information messages, warnings and fatal error messages.
    BB fix to Makefile.am -- overwriting the DBUS stuff with MPRIS definitions, duh.
    Fix some problems building on FreeBSD and tidy up the use of the "sed" editor.
    Fix some problems building on picore.
    Fix an uninitialised variable
    start using the "nqptp" SMI
2022-09-12 15:19:52 +01:00
Mike Brady cd9da86fc3 Add a 'stats' function to the audio back ends to replace the 'rate_info' function. Zero all except the alsa back end. 2021-11-20 13:59:16 +00:00
Mike Brady 54d761ff7d Clean up some of the wording and layout of the configuration file
Clean up and improve the way lead-in sillence is used to give a more accurate sync time to the first packet of audio.
Allow very good sync to occur with 0.3 seconds of lead-in silence.
Improve the use of the buffer offset.
Format some other files.
2020-05-18 16:55:09 +01:00
Mike Brady 67e9b1b6cd partial move to using a nanosecond-based system timer. More to come. 2020-02-24 19:40:44 +00:00
Pieter De GendtandPieter De Gendt 32646f22e2 jack: Rename soxr "recipe" to "quality" and configurable buffer size 2019-12-23 09:10:08 +01:00
Pieter De GendtandPieter De Gendt 311909a2dd Fix input buffer while resampling 2019-12-03 12:17:42 +01:00
Pieter De GendtandPieter De Gendt 7285b1ee03 Jack output add soxr resampling 2019-12-03 10:02:22 +01:00
Chris Boot b9cf91b2bb More typo fixes across the tree
Previously I have made spelling changes as caught by Debian's lintian
tool, which has a short list of common misspellings that it tests for.
This time I decided to run codespell against the source and fix all the
obvious problems it came up with. It also uses a list of misspellings
but it's much larger than lintian's, but also has some false positives
so I went over the list by hand.

The command I used to do check the source was:
git ls-tree -rz --name-only HEAD | xargs -0 codespell -L minimise,errorstring
2019-07-27 00:05:38 -03:00
Mike Brady c8b0be30b4 find . \( -name \*.cpp -or -name \*.h -or -name \*.c \) -exec clang-format -i -style='{BasedOnStyle: llvm, IndentWidth: 2, ColumnLimit: 100}' '{}' \; 2019-06-19 19:06:54 +01:00
Mike Brady 83c0405d03 Add automatic bit depth and speed selection for alsa devices. Set rate and format to "auto" by default. Always look for the greatest bit depth, but the lowest multiple of 44,100.
Improve support for big-endian CPUs by adding support for explicit -endian formats, i.e. S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE.

For the "disable_standby_mode" setting, change "while_active" to "auto".
2019-05-07 10:19:04 +01:00
Jörn Nettingsmeier e59da78348 Fix segfault due to missing null check... 2019-02-16 21:26:32 +00:00
Jörn Nettingsmeier b361ad84fc NOP. Reformat code consistently, improve comments. 2019-02-16 19:57:28 +00:00
Jörn Nettingsmeier 31bbd743a5 Use appropriate warn/inform/debug levels. 2019-02-16 19:01:37 +00:00
Jörn Nettingsmeier 97370d8bce Actually implement auto-connection, and document it. 2019-02-16 18:45:51 +00:00
Jörn Nettingsmeier 4f39e0d830 Move away from hardcoded channels. Centralizes information, simplifies the code, and might be helpful for future surround support. 2019-02-16 16:09:29 +00:00
Jörn Nettingsmeier 28ea6972af Add dummy option jack_autoconnect_option. 2019-02-16 15:33:29 +00:00
Jörn Nettingsmeier 5c1769f87c Partly revert c00199d664, some 0 are actually longs. It's late :( 2019-02-16 02:28:59 +00:00
Jörn Nettingsmeier 3a4deb38a2 Declare all file-global variables as static, remove unused thread pointer. 2019-02-16 02:26:36 +00:00
Jörn Nettingsmeier 90f24c62df Add myself to (C)omplain-to tag :-D 2019-02-16 02:20:21 +00:00
Jörn Nettingsmeier c00199d664 Always use NULL instead of 0 for pointers for clarity. 2019-02-16 02:15:35 +00:00
Jörn Nettingsmeier 95246dcd84 Use more conservative JACK client name (a simple token without whitespace). 2019-02-16 02:05:05 +00:00
Jörn Nettingsmeier 4751a4e1bc Move jack base latency computation out of delay() into graph() to save cycles. 2019-02-16 02:03:15 +00:00
Jörn Nettingsmeier bda8b99cda Add graph reorder callback, this is where we now compute the output latencies. 2019-02-16 01:53:49 +00:00
Jörn Nettingsmeier f1ba07ff2b Make callback names simpler and more consistent. Always use &callback in setter functions to make the function pointer explicit, even though it's not syntactically necessary. 2019-02-16 01:02:30 +00:00
Jörn Nettingsmeier 0009fcddf6 Revert "Remove client_mutex, since JACK opening and closing is now single-threaded."
That was a bit too optimistic, I guess. Must understand more about the rest of shairport-sync.
Fixes spurious segfault on program termination with CTRL-C that does not happen in gdb :)
This reverts commit 8e46c727d5.
2019-02-16 00:53:04 +00:00
Jörn Nettingsmeier 55797c8387 Remove unused headers. <getopt.h> will come back once we implement command line parsing, the others may well be gone for good. 2019-02-15 23:51:11 +00:00
Jörn Nettingsmeier 8e46c727d5 Remove client_mutex, since JACK opening and closing is now single-threaded. 2019-02-15 23:45:12 +00:00
Jörn Nettingsmeier 2826756938 Remove global client_is_open flag, always execute former conditional statements. We know we're open. 2019-02-15 23:43:00 +00:00
Jörn Nettingsmeier 753cc07777 Remove optional is_running() API call, since it doesn't do anything useful.
We are either already running along just fine, or we are throughly dead.
2019-02-15 23:39:53 +00:00
Jörn Nettingsmeier 1906bfd727 Remove indirections open_if_needed() and close(), can now be integrated into API calls init and deinit. 2019-02-15 23:38:01 +00:00
Jörn Nettingsmeier ec68c677e0 Remove jack_stop() function pointer from API struct, since it does nothing. Checked, no segfault on program termination. 2019-02-15 23:17:50 +00:00
Jörn Nettingsmeier 8c5e85c87c Remove audio_client_disconnect option. This is not good behaviour for a JACK client, and adds nothing. 2019-02-15 23:14:31 +00:00
Jörn Nettingsmeier edd699dfbc Remove auto_client_open_interval option, always open JACK connection immediately or fail.
Remove client creation thread and wrapper function.
2019-02-15 23:08:04 +00:00
Jörn Nettingsmeier 63b3381a27 Fail early and fail deadly (AFAIK there is no fallback to another audio backend, so any severe JACK issue should be fatal). 2019-02-15 22:59:31 +00:00
Jörn Nettingsmeier adefcc698c remove unused globals 2019-02-15 19:34:23 +00:00
Jörn Nettingsmeier 0b589cbe6d Remove option to configure port names. This is very unusual for a JACK client, nothing is gained by offering this, and it might confuse users. 2019-02-15 19:29:24 +00:00
Jörn Nettingsmeier 89a8add7af NOP: move external API functions to the end, ordered by struct audio_output 2019-02-15 18:57:15 +00:00
Jörn Nettingsmeier 91a8553a02 Declare all JACK callbacks static (they are accessed via function pointers only). 2019-02-15 18:43:51 +00:00
Jörn Nettingsmeier 9520e89183 Declare all functions static that are not callbacks and not in audio_jack API struct.
If there are any calls from the outside I haven't thought of, that should make them fail.
2019-02-15 18:39:20 +00:00
Jörn Nettingsmeier d7c7365bb1 comment out some debug statements not relevant to users 2019-02-15 18:31:23 +00:00
Jörn Nettingsmeier a3201ff290 Declare deinterleaving function static, it's nobody else's business. 2019-02-15 18:22:33 +00:00
Jörn Nettingsmeier ec13a2bb3a Do not query the JACK port latency on every process() call. It can only ever change when the graph is reordered. 2019-02-15 18:19:44 +00:00
Jörn Nettingsmeier aefd7cdb33 remove more dead code and obsolete comments 2019-02-15 18:09:36 +00:00
Jörn Nettingsmeier 120e95fc66 Add parentheses around macro to avoid breakage with stronger-binding operators. 2019-02-15 18:06:36 +00:00
Jörn Nettingsmeier 444c114231 NOP: remove commented-out code segments that were re-implemented 2019-02-15 17:58:50 +00:00