Version 5.2.2
This update contains enhancements and bug fixes and is recommended for all users.
Enhancement
- If the output rate is different to the input rate (e.g. 48,000 vs 44,100), the deepest output bit depth will be chosen so that the transcoder has the maximum dynamic range available to minimise transcoding inaccuracies.
Bug Fixes
-
Fixed a bug whereby the audio backend latency offset was mishandled in AirPlay 2 operation.
Background: the
audio_backend_latency_offset_in_secondsin thegeneralsection of the configuration file allows you to delay or advance the output by a fixed amount relative to the exact synchronisation time. It can be used, for example, to delay the audio slightly so that it synchronises with audio coming from another device that is delayed by internal processing.The bug was that the latency offset value was being used before the frame rate of the incoming audio was properly set, resulting in an incorrect calculation of the number of frames to offset.
Many thanks to prhodey for discovering and investigating the problem and for a PR that fixes the problem for Buffered Audio streams. An adjustment has also been made to the treatment of Realtime streams.
-
Fixed a subtle output format selection bug thanks to nicolas314's report.
The bug would occur only in specific circumstances when searching for a suitable output rate and format to match the input. Rather ironically, it arose from an attempt to maximise audio fidelity, as follows:
-
If it can be determined from the settings that Shairport Sync ("SPS") does not have to modify the audio, e.g. by changing volume, then SPS will look for an output format with the exact same rate and format as the input, so that audio passes through SPS without alteration of any kind.
-
Unfortunately, due to the bug, if it failed to find an exact match, SPS would start searching at a different output rate.
-
The bug only showed up when it could be determined that no modification of the audio was to be performed. So the bug only occured if
ignore_volume_controlwas set toyesand the output device could not exactly match the input format.
The fix means that if SPS fails to find an exact format match, it will now look for another format at the same rate before searching at other rates.
In addition, to be sure that no further audio processing is needed, SPS checks to ensure that neither convolution not loudness are enabled.
-
Documentation Update
- Update the README reference to the MPRIS specification to the latest version. Thanks to Dmitry Batin for the PR.
Building Enhancement
- Remove the explicit
-forxxdto read fromSTDIN. It's not necessary, and removing it makes it easier to package Shairport Sync on other build systems, such as OpenWrt. Thanks to kel-mo for the PR.
Dependabot Updates
- Dependabout updates were made to some of the tools in the CI / GitHub build system.