Commit Graph
88 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 5abf393f7e clang format 2023-09-21 16:45:22 +01:00
Mike Brady eed22e4154 update to correspond with the move of principal_conn_lock to a pthread_rwlock. 2023-09-21 16:33:19 +01:00
Mike Brady 986f9587de Rebuild the locking mechanisms for safe interruption of an existing play session. 2023-09-09 10:49:32 +01:00
dasl- ebe1ca17f2 rename to dasl_tapered 2023-07-13 21:43:25 -04:00
dasl- baf51cf2a7 Add logarithmic volume_control_profile mode 2023-07-02 09:27:53 -04:00
Mike Brady 8201903a4e Add code to try to save your ears by handling a situation where the player volume was set very high some time ago and you have forgotten.
In that situation currenctly, when you play something, it will come out at the last volume set on the device, which will be that very high volume.
This could happen, for example, the morning after a loud party :).

The new code works as follows: If nothing has been played for a period, say a few hours, and the volume is higher than a threshold, new connections that ask
for the current volume setting will be offered the default (low) volume rather than the current (very high) one.
Most players, including the HomePod mini, iOS and iPadOS use this to set their initial volume.
The Mac Music app retains its own setting, and the Mac System Sounds preference sometimes seems to take its setting from the Music app,
but at least you can see the settings they will apply.

Existing connections are unaffected, so this facility should be unobtrusive.
2023-01-18 10:41:50 +00:00
Mike Brady d6536a8e79 Call the unfixable error if the output device can't be opened or disappears. Clang-format. 2022-12-30 18:36:33 +00:00
Mike Brady 37f060f48e Add "FirstFramePostion" property set when first frame of a play session is sent. 2022-11-28 15:09:43 +00:00
Mike Brady 4044666897 clang format 2022-11-26 19:09:42 +00:00
Mike Brady 64858a238c Add albumArtist and composer lists if available. Add a FramePosition property giving the RTP frame number and the time it is to be played. ASlso add a SetFramePositionUpdateInterval method to get it to be generated at intervals. 2022-11-26 17:54:09 +00:00
Mike Brady e8b8c6edb7 Clang cleanup 2022-11-18 18:14:50 +00:00
Mike Brady 9af924dd43 Add OutputRate and OutputFormat properties to the D-Bus interface. 2022-11-12 17:45:36 +00:00
Mike Brady d67909b837 Add new metadata item: sps:songdatakind, derived from the asdk metadata token. It seems to indicate a timed item (0) or an untimed stream (1). Add output format, output frame rate, stream type (Realtime/Buffered/Classic) properties. Update MQTT appropriately. 2022-11-12 16:42:25 +00:00
Mike Brady 3e4b67e97d Add two new metadata items -- the player's service name, e.g. "Den Speakers" and the name of the current client, if any, e.g. "Joe's iPhone". 2022-11-07 11:33:05 +00:00
Mike Brady 62fca43f49 Fix a bug when displayConfig was exiting when the soxr timer thread hadn't been started. Also quieten a cryptic dbus message. 2022-10-12 14:21:43 +01: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 05dfcdfd6a Merge other enhancements. 2022-08-09 14:18:53 +01:00
Mike Brady 4963c65a0e Fix the D-Bus quit method so that it works, duh. 2022-08-07 11:15:54 +01:00
Mike Brady b81fb39a80 Add a new D-Bus method called "DropSession" to forcibly terminate the current play session. 2022-08-07 10:02:56 +01:00
Mike Brady 720a271eec Add "Protocol" property -- AirPlay or AirPlay 2. 2022-08-06 19:33:09 +01:00
Mike Brady 8b7e844e38 Add local volume control, not mediated by remote control. 2022-08-06 19:20:26 +01:00
Mike Brady e3faba141c log statsistics headers whenever verbosity goes on or off or whenever statistics are requested 2021-11-28 21:51:26 +00:00
Mike Brady dfd90bac6b Clean up code for the silent lead-in on a non-syncing back end e.g. a pipe. Clean up pipe creation and initial opening and associated error messages. Fix error with warning/die messages. Tidy up some debug messages. 2020-06-05 17:22:53 +01: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 789ba1ee5e Treat the "mper" attribute as the 64-bit item that it is rather than a 32-bit item as hithereto. Output it as a hexadecimal number to correspond with the format of the track id obtained from AppleScript 2020-02-18 14:09:43 +00:00
Mike Brady 85ba78b619 More fixes to allow gcc-10 to compile without error 2020-02-13 17:57:30 +00:00
Mike Brady ec665d9be4 Change from talking about a server to talking about a client. Technically, e.g. iTunes is a client of Shairport Sync. 2020-01-10 17:21:55 +00:00
Mike Brady 1f75fe4e7a Add or update some of the copyright notices 2019-12-27 14:37:01 +00:00
Mike Brady fe8198a23b Add SetAirplayVolume to the D-Bus RemoteControl interface.
Add SetVolume to the MPRIS interface.
Hook up the Volume property in the MPRIS interface.
Modify RemoteCommand in the D-Bus interface to return the HTTP status and response.
Change the type of airplay_volume from int to double in the metadata hub.
Add a few sample commands in the D-Bus document.
2019-12-20 17:17:21 +00:00
Mike Brady f2930387b3 Add D-Bus convolution filter controls; enable convolution filters to be turned on and off or changed; enable convolution gain to be checked and changed. 2019-11-11 21:45:29 +00:00
Mike Brady 2f2442f4aa Fix D-Bus loudness switch silencing output. Rename LoudnessFiulterActive to Loudness. Add Convolution, ConvolutionGain and ConvolutionImpulseResponseFile properties to the D-Bus interface. 2019-11-10 18:05:59 +00:00
Mike Brady db8f10cfa1 add the option (normally on) of including the file name and line number of the originrating message in a debug log message 2019-09-17 12:14:55 +01:00
Mike Brady 839c778a7c Only send shuffle commands if a change is necessary 2019-09-08 15:53:52 +01:00
Mike Brady 86b6d7bfff Squashed commit of the following:
Fix Issue #890 -- https://github.com/mikebrady/shairport-sync/issues/890
    Recognise situation where a track has no artwork properly.
    Less likely to drop the 'availabile' property.
    Always output the full metadata whenever any part of it has changed.
    Metadata coming from dacp is now incorporated,
2019-08-29 11:47:49 +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
Mike Brady 848467a817 Add "auto" interpolation support to the dbus interface. 2019-04-28 21:39:42 +01:00
Mike Brady f74e2c2c96 Revert some experimental changes made to explore problems with Cygwin D-Bus access. 2019-02-27 12:53:09 +00:00
Mike Brady d3d86d6192 Try to get a private connection to the system D-Bus 2019-02-20 18:43:10 +00:00
Mike Brady 405a028f33 quieten some exiting debug messages 2019-02-16 19:44:25 +00:00
Mike Brady 5af6179875 use the term'state' rather than 'mode' when taling about the active state. Use 'while_active' rather than 'while active' 2019-02-12 15:47:10 +00:00
Mike Brady 97a4766e93 Add call to check if the dbus service is started. 2019-02-08 22:31:50 +00:00
Mike Brady 34351a99cb Continue hooking up active mode and disable standby stuff 2019-02-08 16:57:39 +00:00
Mike Brady 2e4428538d Add an "active" mode that can time out after a period -- 10 seconds by default -- after play ends. 2019-01-21 21:43:55 +00:00
Mike Brady a74261bbd3 Add a D-Bus property "DisableStandby" to turn standby oo or off. 2019-01-11 14:48:00 +00:00
Mike Brady c9b3d2a2f4 Many changes to compilation and linking flags. Stop using HAVE_* flags except where necessary, use CONFIG_* for optional stuff, use HAS_* for immediate definitions, use USE_* for AM definitions. Probably introduced bgs, sigh. 2018-09-09 20:41:31 +01:00
Mike Brady 69642bb7de Partly clean up use of automake, autoconfig and compiler flags. Works but still not consistent. 2018-09-09 14:12:20 +01:00
Mike Brady 5141e2f5dc Format tidy-up 2018-08-14 12:14:49 +01:00