Skip to content

Releases: mikebrady/shairport-sync

Version 3.2. New D-Bus and MPRIS Interfaces, Important Bug Fixes and Enhancements.

09 Jul 13:40
47eabab
Compare
Choose a tag to compare

Version 3.2

Version 3.2 introduces two big new features – MPRIS support and a "native" Shairport Sync D-Bus interface. MPRIS offers a standard set of facilities for implementing remote control and the native D-Bus interface allows local programs to interact directly with Shairport Sync. When used with either of these interfaces, Shairport Sync offers access to the remote control commands available to control the source, and also offers access to metadata, including titles and cover art. These new features are experimental, but are already useful.

This release of Shairport Sync contains important bug fixes and stability improvements and is recommended for all users. If offers better synchronisation, better compatibility with third-party AirPlay sources, greater stability when used with YouTube and macOS system sound, faster resynchronisation, better performance on noisy or congested networks and many other improvements.

A quick INSTALL guide for the Raspberry Pi, a how-to CAR INSTALL guide and a note about installing to OpenBSD have been added.

Here are some of the details:

New Features

  • Shairport Sync now offers an IPC interface via D-Bus. It provides an incomplete but functional MPRIS interface and also provides a "native" Shairport Sync interface, both of which rely on D-Bus. Both provide some metadata and some remote control. The native interface includes status information about whether the remote control connection is viable or not, i.e. whether it can still be used to control the client. A remote control connection to the audio client becomes valid when the client starts AirPlaying to Shairport Sync. The connections remains valid until the audio source deselects Shairport Sync for AirPlay, or until the client disappears, or until another client starts AirPlaying to Shairport Sync. After 15 minutes of inactivity, the remote contol connection will be dropped.

Enhancements

  • OpenBSD compatibility. Shairport Sync now compiles on OpenBSD - please consult the OpenBSD note for details.
  • A new volume_control_profile, in the general section and for advanced use only, with two options: "standard" which uses the standard volume control profile – this has a higher transfer profile at low volumes and a lower transfer profile at high volumes – or "flat" which uses a uniform transfer profile to linearly scale the output mixer's dB according to the AirPlay volume.
  • Some DACs have a feature that the lowest permissible "attenuation" value that the built-in hardware mixer can be set to is not an attenuation value at all – in fact, it is a command to mute the output completely. Shairport Sync has always checked for this feature, basically in order to ignore it when getting the true range of attenuation values offered by the mixer.
    However, with this enhancement, Shairport Sync can actually use this feature to mute the output where appropriate.
  • Added or improved compatibility with AirFoil, TuneBlade, Swinsian, AirAudio, Synology AudioStation/5.2.

Bug Fixes

  • Better AirPlay synchronisation. Older versions of Shairport Sync added an 11,025 frame (0.25 seconds) offset to all the latencies negotiated with the sender. This seems now incorrect for AirPlay sources. Accordingly, the logic Shairport Sync uses to determine the extra delay has been revised. The result is better sync with videos, e.g, YouTube, while iTunes and ForkedDaapd synchronisation is unaffected. Older versions of AirPlay are still handled correctly.
  • Much faster termination of a play session, leading to increased stability playing YouTube audio, etc.
  • Improved resynchronisation logic should improve performance on congested networks.
  • Dithering is now off when ignore_volume_control is true. Thanks to yejun for working on this independently.
  • Better volume level continuity. In recent versions of iOS (11.2) and mac OS (10.13.2), when play is resumed after a pause, the volume level is not always restored, and, if software volume control is being used, Shairport Sync plays at full volume. This issue has been addressed by storing the last airplay volume setting when a play session ends and using it as a default when a new play session begins.
  • Better mixer compatibility. A bug in the hardware volume control affected output devices that have hardware mixers but that do not allow the volume to be set in dB. One example is the Softvol plugin in ALSA. Shairport Sync failed silently when presented with such a device when hardware volume control is enabled: the volume events have no effect. The bug has been fixed by adding two missing lines of code to the init() function in audio_alsa.c. Thanks to Jakub Nabaglo for finding and fixing the bug.
  • Thanks to belboj, funtax, Janusz Kowalczyk, Mmoi-Fr, mistipen, artenverho, Jörg Krause and David Krmpotić for help with bug detection, investigation and repair.

Other Changes

  • clip and svip metadata messages are now only generated for a play connection, not for all connections (e.g. connections that just enquire if the service is present).
  • pfls and prsm metadata messages are less frequent, especially when a play session starts.
  • Shairport Sync now uses about an extra half megabyte of RAM for compatibility with TuneBlade's option to have a very long latency -- up to five seconds.
  • Improvements in missing-packet resend request logic, and if an error occurs making the request, back off for half a second.
  • Include the -pthread flag -- including the pthread library with -lpthread isn't always enough.
  • Add optional timing annotations to debug messages -- see the new settings in the diagnostic stanza of the configuration file.

Updated Documentation

Version 3.2d29 – DBus and MPRIS interfaces, Enhancements and Bug Fixes

12 Mar 22:12
85929c3
Compare
Choose a tag to compare

Advanced New Features

  • A bare-bones "native" D-Bus interface for Shairport Sync permitting control of some diagnostic settings. To be expanded...
  • A partly implemented MPRIS control interface including play/pause/next/previous/volume and some metadata.
  • Remote control of an iTunes source including play/pause/next/previous/volume.
  • Remote control of an AirPlay source including play/pause/next/previous.
  • Barebones support added for OpenBSD compilation.
  • A new general option volume_control_profile, for advanced use only, with two options: "standard" which uses the standard volume control profile -- this has a higher transfer profile at low volumes and a lower transfer profile at high volumes -- or "flat" which uses a uniform transfer profile to linearly scale the output mixer's dB according to the AirPlay volume.

Enhancements

  • CAR INSTALL and OPENBSD notes added.
  • Only ask for missing packets to be resent once, and if any error occurs making the request, stop for 10 seconds.
  • Include the -pthread flag -- including the pthread library with -lpthread isn't always enough.
  • Improvements in the documentation relating to scripts -- thanks to Niklas Janz.
  • Add optional timing annotations to debug messages -- see the new settings in the diagnostic stanza of the configuration file.
  • Better handling of missing timing packets.
  • Improved resnchronisation logic should improve performance with slow-to-download YouTube videos.
  • Shairport Sync will now log an unexpectedy dropped or faulty RTSP connection. This might be useful on noisy networks.
  • Some DACs have a feature that the lowest permissible "attenuation" value that the built-in hardware mixer can be set to is not an attenuation value at all – it is in fact a command to mute the output completely. Shairport Sync has always checked for this feature, basically in order to ignore it when getting the true range of attenuation values offered by the mixer.
    However, with this enhancement, Shairport Sync can actually use this feature to mute the output where appropriate.

Bug Fixes

  • Ensure the TEARDOWN of a play session is not delayed by a long sleep timer.
  • Allow more than one ANNOUNCE packet for the same play session. Honour the settings in the most recent one.
  • Move the creation and calling of a player thread from the SETUP handler to the RECORD handler.
  • When closing an ALSA sound device, don't wait for any remaining audio to be output with snd_pcm_drain; instead, just drop all remaining frame using snd_pcm_drop.
  • TEARDOWN should complete in less than 50 ms.

Version 3.2d22 –– Development Version, Fix Airfoil latency bug

09 Jan 21:09
4499f63
Compare
Choose a tag to compare

Continuing the experiments with D-Bus and related DACP support.

Bug Fix

  • Fix timing error when using Airfoil as a source.

Version 3.1.7 – Stable Version. Bug fixes, better compatibility with iOS11/macOS 10.3.2

21 Dec 13:37
38f977f
Compare
Choose a tag to compare

Bug Fixes

  • In recent versions of iOS (11.2) and mac OS (10.13.2), when play is resumed after a pause, the volume level is not always restored, and, if software volume control is being used, Shairport Sync plays at full volume. This issue has been addressed by storing the last airplay volume setting when a play session ends and using it as a default when a new play session begins.
  • Better AirPlay synchronisation. Older versions of Shairport Sync added an 11,025 frame (0.25 seconds) offset to all the latencies negotiated with the sender. This seems now only to be correct for iTunes and ForkedDaapd sources, but incorrect for AirPlay sources. Accordingly, the offset is only added for iTunes and ForkedDaapd. The result is better sync with videos, e.g, YouTube, while iTunes and ForkedDaapd synchronisation is unaffected.
  • A bug in the hardware volume control affected output devices that have hardware mixers but that do not allow the volume to be set in dB. One example is the Softvol plugin in ALSA. Shairport Sync failed silently when presented with such a device when hardware volume control is enabled: the volume events have no effect. The bug has been fixed by adding two missing lines of code to the init() function in audio_alsa.c. Thanks to Jakub Nabaglo for finding and fixing the bug.
  • A number of bug fixes due to belboj. Many thanks for these!
  • Enhancements to the handling of quit requests by threads, thanks(again) to belboj!
  • (Fixed a silly bug in 3.1.5 prerelease.)

Other Stuff

  • Typo fix! Thanks to corbinsantin.
  • change version to 3.1.7 to synchronise the shairport-sync.spec file contents with the release.

Enhancement

  • The metdata output stream can include a dapo message carrying the DACP port number to be used when communicating with the DACP remote control. This might be useful because the port number is actually pretty hard to find and requires the use of asynchronous mdns operations. You must be using the Avahi mdns back end.

Version 3.2d20 –– Development Version, Fix silly segfault bug

13 Dec 23:56
845c468
Compare
Choose a tag to compare

Bug Fix

  • Fix silly seg-fault bug, activated when a DACP record was withdrawn.

Version 3.2d16 –– Development Version, Set correct Volume after Pause/Resume

09 Dec 20:50
c803a96
Compare
Choose a tag to compare

Bug Fix

  • In recent versions of iOS (11.2) and mac OS (10.13.2), when play is resumed after a pause, the volume level is not always restored, and, if software volume control is being used, Shairport Sync plays at full volume.

This issue has been addressed by storing the last software volume setting when a play session ends and using it as a default when a new play session begins.

Version 3.1.4 – Stable Version, Important Security Update

23 Nov 15:43
7d51c06
Compare
Choose a tag to compare

Security Update

  • The version of tinysvcmdns bundled in Shairport Sync has a buffer overflow bug: "An exploitable heap overflow vulnerability exists in the tinysvcmdns library version 2016-07-18. A specially crafted packet can make the library overwrite an arbitrary amount of data on the heap with attacker controlled values. An attacker needs send a dns packet to trigger this vulnerability." The vulnerability is addressed by additional checking on packet sizes. See also CVE-2017-12087 and Vulnerability in tinysvcmdns.
    Thanks and Chris Boot for fixing this bug.

Bug Fix

  • Somewhere in version 3.x, the softvol plugin got broken as the volume change is not applied anymore. Turned out that, for the softvol plugin, no volume() and parameters() are defined. Thanks to Jörg Krause for locating and fixing this bug.

Version 3.2d13 – Development Version, Important Security Update

23 Nov 15:51
30dd9ca
Compare
Choose a tag to compare

Security Update

  • The version of tinysvcmdns bundled in Shairport Sync has a buffer overflow bug: "An exploitable heap overflow vulnerability exists in the tinysvcmdns library version 2016-07-18. A specially crafted packet can make the library overwrite an arbitrary amount of data on the heap with attacker controlled values. An attacker needs send a dns packet to trigger this vulnerability." The vulnerability is addressed by additional checking on packet sizes. See also CVE-2017-12087 and Vulnerability in tinysvcmdns.
    Thanks and Chris Boot for fixing this bug.

Continuing experiments with D-Bus and MPRIS support. As before, please note that the implementation is likely to change greatly or be removed at any time.

Version 3.2d10 – Continuing D-Bus Experimentation

22 Oct 09:25
Compare
Choose a tag to compare

Continuing the experiments with D-Bus support, Shairport Sync can now be compiled to have a D-Bus presence on the D-Bus system bus. It presents a small number of properties and can execute a method call which sends a command string to the audio source's DACP port. As before, please note that the implementation is likely to change greatly or be removed at any time.

Enhancement

  • The metdata output stream can include a dapo message carrying the DACP port number to be used when communicating with the DACP remote control. This port number is actually pretty hard to find and requires the use of asynchronous mdns operations. You must be using the Avahi mdns back end.

Bug Fix

  • A bug in the hardware volume control affects output devices that have hardware mixers but that do not allow the volume to be set in dB. One example is the Softvol plugin in ALSA. Shairport Sync fails silently when presented with such a device when hardware volume control is enabled: the volume events have no effect. The bug has been fixed by adding two missing lines of code to the init() function in audio_alsa.c. Thanks to Jakub Nabaglo for finding and fixing the bug.

Other Stuff

  • Changed the debug verbosity level of some debug messages.

Version 3.1.3 – Stable Version. A fix for automatic startup on older System V based systems.

25 Sep 16:57
Compare
Choose a tag to compare

Bug Fix

  • Fixed a bug that prevented Shairport Sync from starting automatically on older systems using the System V startup system (e.g. Ubuntu 14.04). The problem was that the directory to be used – /var/run/shairport-sync/ – was deleted on power down and needed to be recreated on startup. In it's absence, Shairport Sync would not start and would report a mysterious daemon error (2).

Recent systems are unaffected.