]> git.ipfire.org Git - thirdparty/shairport-sync.git/blame - RELEASENOTES.md
Update RELEASENOTES-DEVELOPMENT.md
[thirdparty/shairport-sync.git] / RELEASENOTES.md
CommitLineData
b46962c7
MB
1Version 4.2
2====
290a431a 3This release consists of enhancements and a number of important bug fixes to Version 4.1. For information on the new features of 4.1, including AirPlay 2 support, please see the section "Version 4.1" below.
b46962c7
MB
4
5Important
6----
7If you are updating an existing installation of Shairport Sync, you must also update [NQPTP](https://github.com/mikebrady/nqptp). The reason is that this update to Shairport Sync requires NQPTP with Shared Memory Interface Version `smi9` and will not work with older versions.
8* The Shared Memory Interface Version `smi*` needed by Shairport Sync is part of its version string, obtainable using `$ shairport-sync -V`.
9* You can check the Shared Memory Interface Version of the installed version of `nqptp` using `$ nqptp -V`.
10
11**Enhancements**
12* Allow compilation with `libplist` version `2.3.0`. Thanks to [Markus Reiter](https://github.com/reitermarkus).
b56d5515
MB
13* Update GitHub Action Workflows -- many thanks to [yubiuser](https://github.com/yubiuser).
14* Update MQTT documentation to correspond to updates in [Home Assistant](https://www.home-assistant.io/blog/2022/06/01/release-20226/#breaking-changes). Thanks to [hunhejj](https://github.com/hunhejj).
15* Update NQPTP communication to improve performance. Shairport Sync now passes activity information to NQPTP, enabling it to process timing data more accurately.
b46962c7 16
10ee0721
MB
17**Docker Image Enhancements**
18* Add basic PulseAudio support. Thanks to [Ferdynand Naczynski](https://github.com/nipsufn) and thanks also to [Noel Hibbard](https://github.com/noelhibbard) for championing this idea for a long time.
19* Update to Alpine 3.17 and ensure services such as Avahi and D-Bus start in the correct order. Thanks to [yubiuser](https://github.com/yubiuser).
b46962c7
MB
20
21**Bug Fixes**
10ee0721
MB
22* Sometimes the AirPlay Device ID generated by Shairport Sync was all zeros, and so was invalid, causing connectivity problems. The cause of the problem was that `get_device_id` was not interpreting `getaddrinfo` information correctly. Thanks to [Carl Johnson](https://github.com/ridgelift) for [reporting](https://github.com/mikebrady/shairport-sync/issues/1657) the issue, finding the (rather obscure) cause of the problem and for providing [code](https://github.com/mikebrady/shairport-sync/issues/1657#issuecomment-1493423175) to fix it.
23* Fix a bug reported in Issue [#1633](https://github.com/mikebrady/shairport-sync/issues/1633). The bug was that when a Realtime Audio stream (e.g. playing from Spotify on iOS or using Shairport Sync as the Sound Output on a Mac) was played, it was fine, but when it was stopped and a second stream was started, the new stream could not be heard. The problem was that the PTP clock was not being correctly revalidated for second and subsequent Realtime Audio streams. The fix was to ensure that the PTP clock is revalidated on second and subsequent plays on the same connection. Thanks again to [David Leibovic](https://github.com/dasl-) for finding the problem.
b46962c7
MB
24* Use TCP keepalive a little more generally -- treat it the same as a client closing the link rather than just an error.
25* Remove three potential race conditions between Shairport Sync opening a TCP connection and the client checking that the connections are open. The problem was that the connections were being opened in threads that were created just before the client was given the connection information. If the threads were delayed (e.g. on a slow or busy processor), the client could use the connection information to check the connections, but find that they were not (yet) open. This could cause the client to terminate the session immediately with a `TEARDOWN`. The fix was to open the connections before creating those threads and before sending the connection information back to the client. In this way, the connections are guaranteed to be open before the client has the information it needs to try to open them, even if the threads ared delayed in starting. This bug would manifest itself by allowing play to proceed but not play anything.
26* When built for AirPlay 2, ensure the hexadecimal string that prefixes the AirPlay 1 Service Name in the Bonjour text strings matches the AirPlay 2 Device ID. For example, if the Service Name is `Kitchen` and the AirPlay 2 Device ID is `b8:2f:eb:d7:85:df`, the AirPlay 1 Service Name should be `B82FEBD785DF@Kitchen`. (When built for AirPlay 1, the hexadecimal prefix is simply a hash of the Service Name.) Thanks to [Casper](https://github.com/casperghst42) for raising the [issue](https://github.com/owntone/owntone-server/issues/1578) and to [ejurgensen](https://github.com/ejurgensen) for identifying the cause of the problem.
27
28Version 4.1.1
29====
30This release consists of enhancements and bug fixes to Version 4.1. For information on the new features of 4.1, including AirPlay 2 support, please see the section "Version 4.1" below.
31
32**Enhancement**
33* Use the TCP `keepalive` facility to close a play session if the client connection drops for a minute.
34
35**Metadata Enhancements**
36* Add `FramePosition` (`phbt`), `FirstFramePosition` (`phb0`), `OutputRate` (`ofps`), `OutputFormat` (`ofmt`), `StreamType` (`styp`), `ServiceName` (`svna`), `ClientName` (`snam`) properties to the D-Bus interface and to the metadata stream (codes in brackets).
37* `FramePosition`/`FirstFramePosition` metadata is generated only if the `progress_interval` in the `metadata` section of the configuration file is non-zero. The progress interval can also be set by a new `SetFramePositionUpdateInterval` method in the D-Bus interface.
38* `FramePosition`/`FirstFramePosition` metadata is of the form `<RTP Frame number>/<Local Time>` where the local time, in nanoseconds (a 64-bit number), is the precise time that frame should be played. The metadata is generated when the frame is placed in the output buffer, and is thus generated `audio_backend_buffer_desired_length_in_seconds` (usually 0.2 seconds) before the time in question.
39* Add `xesam:albumArtist` and `xesam:composer` metadata (if available) to the metadata bundle presented in the D-Bus interface.
40* Add a new metadata item: `sps:songdatakind`, derived from the `asdk` metadata token, to the metadata bundle presented in the D-Bus interface. If `0` it seems to indicate an item of a specific duration such as an audio track; if `1` it seems to mean the stream is of unknown duration, for example an internet radio stream.
41
42**Docker Enhancements**
43* Launch the `shairport-sync` app as `root` user within the Docker container rather than as the user `shairport-sync`.
44* Add the configuration file and the sample configuration files back into the Docker image.
45
46**Bug Fixes**
47* Fix a bug that prevented multiple classic AirPlay instances being recognised. The bug was that the 12-digit classic AirPlay service name prefixes for each instance were all identically derived from a MAC hardware address. The fix was to modify the generation of prefixes to depend on the service name as well as the hardware address.
48* Fix a bug that prevented play to the the PulseAudio backend from resuming after a pause. The bug was due to changes in the way pauses were handled and the fix was to reopen the stream if it is closed whenever a play or latency request was made.
49* Fix a long-standing bug which didn't close the socket used for the RTSP connection, potentially exhausting the sockets available.
50* Fix a bug in `audio_alsa.c` when there is no hardware device name.
51* Add a configuration check for the `xxd` program when building for AirPlay 2.
52* Fix a compilation bug on certain platforms by trying to use `AC_CHECK_LIB` to find `libavcodec` if the `PKG_CHECK_MODULES` check fails.
53
54**Documentation**
55* Include and reference the HTML version of the man page.
56
57Version 4.1
01b4fbdd
MB
58====
59
60Really Big Update -- AirPlay 2!
61----
62Version 4.1 brings support for AirPlay 2 operation. It works with iOS, iPadOS, macOS, HomePod mini and Apple TV sources, but not with Windows.
63Limited support is available for HomeKit -- Shairport Sync speakers can be added to the Home app, though not all features are working.
64AirPlay 2 operation requires a companion program called NQPTP and requires a somewhat more powerful system. Please see [AIRPLAY2.md](./AIRPLAY.md) for more.
65
66Note that you can still build Shairport Sync to support "classic" AirPlay (aka "AirPlay 1") as before.
67
68The various guides for building and updating Shairport Sync have been consolidated into [BUILD.md](./BUILD.md).
69
70Here is a brief list of the high-level new features and changes (more to be added):
71* AirPlay 2 operation.
72* Improved `libao` backend for better compatibility with HomeBrew installations.
73* Improved MQTT and D-Bus facilities.
b46962c7 74* Automatically-generated Docker images.
01b4fbdd
MB
75
76There have been many many bug fixes and enhancements to the core operation of Shairport Sync.
77
78Version 3.3.9
79====
80**Bug Fix**
81* Version 3.3.9 fixes a build failure with convolution raised since `automake 1.16.5` and https://git.savannah.gnu.org/cgit/automake.git/commit/?id=f4a3a70f69e1dbccb6578f39ef47835098a04624.
82Further details in [Fabrice Fontaine's original PR](https://github.com/mikebrady/shairport-sync/pull/1314) to the `development` branch. Many thanks to [Fabrice Fontaine](https://github.com/ffontaine) for the bug report and for the fix.
86672a61 83
83c9e361
MB
84Version 3.3.8
85====
272b3db5
MB
86**Enhancements**
87* Documentation for the MQTT interface. Many thanks to [minix1234](https://github.com/minix1234)!
88
89**Bug Fixes**
6c628da8
MB
90* Fix a bug in the `alsa` back end. In the interval between checking that the alsa device handle was non-`NULL` and actually using it, the handle could be set to `NULL`. The interval between check and usage is now protected.
91* Fix a bug in the `alsa` precision timing code. Thanks to [durwin99](https://github.com/durwin99), [Nicolas Da Mutten](https://github.com/cleverer), [mistakenideas](https://github.com/mistakenideas), [Ben Willmore](https://github.com/ben-willmore) and [giggywithit](https://github.com/giggywithit) for the [report](https://github.com/mikebrady/shairport-sync/issues/1158).
07c6d1db 92* Fix a bug that caused Shairport Sync to hang, but not actually crash, if an `on-...` script failed.
dabaa32a
MB
93* Fix a crash that occurred if metadata support is enabled during compilation but turned off in the configuration file. Thanks to [Tim Curtis](https://github.com/moodeaudio) for the report.
94* Fix a crash that occurred playing from AirPower on Android. Thanks to [Ircama](https://github.com/Ircama) for the report.
cfc6612e 95* Fix the configure.ac file so that `--without-<feature>` configuration options are not interpreted as `--with-<feature>` options instead! Thanks to [David Racine](https://github.com/bassdr) for the report.
83c9e361 96
907f7b8b
MB
97Version 3.3.7
98====
99**Docker Integration**
37cd5ab3
MB
100* Docker Hub integration. From now on, prebuilt Docker images should be available on the Docker Hub at https://hub.docker.com/r/mikebrady/shairport-sync.
101
907f7b8b
MB
102**New Feature**
103* For the PulseAudio backend `pa`, added a new `server` entry to the `pa` section of the configuration file, allowing you to specify a connection to a remote or a local system PulseAudio instance instead of letting PulseAudio choose. Thanks to [Guillaume Revaillot](https://github.com/grevaillot) for this new feature.
104
105**Pesky Changes**
106* The underlying timing system has been moved from 64-bit fixed-point time representation (like NTP) to a 64-bit unsigned nanoseconds representation. This should make precisely no difference to the functionality of Shairport Sync but the transition might inadvertently have introduced bugs. Problem reports gratefully received.
107
108**Bug Fixes**
109* Fixed a number of bugs that prevented Shairport Sync from terminating cleanly in response to the `MPRIS` interface's `Quit()` command. Thanks to [João Gabriel](https://github.com/jgabriel98) for reporting this issue.
110* Related to the above, the code used to terminate the application after a fatal error has been cleaned up. It now uses the correct `exit()` call rather than the rather hacky `abort()` call, returning the value of the constant `EXIT_FAILURE` (typically `1`) to the caller .
111* Fixed a bug whereby the start and end of active mode tokens `abeg` and `aend` where not generated or published -- `pend` tokens were being generated instead. Thanks to [minix1234](https://github.com/minix1234) for the bug report and [fix](https://github.com/mikebrady/shairport-sync/pull/1023).
112* Fixed a bug calculating the instantaneous synchronisation error. This bug could occasionally cause Shairport Sync to lose synchronisation and maybe even to mute for a few seconds before resynchronising. It was caused doing modulo arithmetic incorrectly and it's been there for a while.
113* Removed a bug which would affect initial synchronisation if a `FLUSH` command was received from the player at an inopportune time.
114* Added code to do calculations involving the `audio_backend_latency_offset_in_seconds` and `audio_backend_silent_lead_in_time` settings correctly. Many thanks to [Tucker Kern](https://github.com/mill1000) for discovering a number of bugs associated with this and for [proposing a solution](https://github.com/mikebrady/shairport-sync/pull/1001). This prompted a closer investigation and a number of further improvements were made, and a few "hostages to fortune" removed.
115* The DACP ID looks like a 64-bit number expressed in hexadecimal. It is normally quoted with leading zeroes removed, but in the `_dacp._tcp` service string, leading zeros are not removed from the DACP ID. The bug fix removes those leading zeroes. Thanks to [julianc1969](https://github.com/juliandc1969) for tracking down this bug so tenaciously!
4bc77f43
MB
116* Make the first output backend in the list of backends the default and make its name the default `output_name`.
117* Fix a flaw in resyncing -- a flush is set up but not triggered.
118* Ensure metadata and cover art are enabled if metadata support is included at compilation.
119* Set convolution defaults even if no configuration file is found.
120* Handle the `active_remote_id` token as a string rather than an unsigned 32-bit number -- it seems ROON uses a longer character sequence.
907f7b8b
MB
121
122**Enhancements**
02cd3f8f 123* Added the strings `-alac` and `-jack` to the the version string returned by the `-V` command line option if Apple ALAC decoder support and Jack Audio support are included respectively.
907f7b8b
MB
124* Cleaned up and simplified the code that handles `FLUSH` requests coming from the player. (Debug messages are still a little verbose.)
125* Improved timing estimation. Shairport Sync has been using linear least-squares regression to estimate timing drift between the (remote) source clock and the local clock. This technique is now extended to provide an estimate of the remote-to-local clock difference itself. (The remote-to-local clock difference is used to remap the timing of audio frames from the remote device's clock to the local clock.)
126
127 Timing drift estimates are now saved when a sessions ends, keyed to the client IP number. When a new session starts from that IP number, the stored estimate is used until a new estimate can be generated from the new session.
128
129 In practice, the timing techniques in use up to now have been very accurate, but this should result in slightly smoother rates of correction.
130* Tidied up the creation and initial opening of pipes. Suppress repeated pipe-opening error messages.
131* Tidied up warnings and fatal error messages when log verbosity is zero.
132* Cleaned up the code that provides a silent lead-in to play on a back end without synchronisation, e.g. a pipe or `stdout`.
133* Added in commented-out code to check the timeliness of the release of audio to a back end without synchronisation, e.g. a pipe or `stdout`. TL;DR – so long as the back end does not block, frames will be released to it not more than one packet (352 frames) late.
134* Logs and statistics can now be directed to the system log (default), `stdout`, `stderr` or to a file or pipe of your choice using a new setting, `log_output_to` in the `diagnostics` section of the configuration file. This is very useful when the system log is disabled or diverted.
135* Audio data from the `pipe` back end and metadata from the metadata pipe are now written using standard blocking `write` commands rather than a slightly complex non-blocking write function. Pipes are now opened in non-blocking mode and changed to blocking mode when successfully opened.
8873923e 136* Add a default name for the pipe backend: `/tmp/shairport-sync-audio`.
907f7b8b
MB
137* Separate threads are now used for each metadata subsystem. Until now, all metadata was processed on a single thread. This included writing to the metadata pipe and the multicast stream and supplying metadata for the `mqtt` interface and for the `dbus` and `MPRIS` interfaces. Unfortunately, that meant that a problem with any one of these subsystems could propagate into the others. Now they all run on separate threads. If one thread blocks, it will not interfere with the other subsystems.
138* Cleaned up and improved the code to synchronise the first frame of audio. This should result in more accurate and reliable initial synchronisation, usually to under a millisecond, and often to within 20 or 30 microseconds. Syncronisation should improve even when the silent lead-in time is as short as 0.3 seconds or when the `audio_backend_latency_offset_in_seconds` is as much as -1.7 seconds, i.e. when only 0.3 seconds of latency are left when the latency would normally be 2.0 seconds.
139* Cleaned up some confused uses of modulo arithmetic.
140* Cleaned up the allocation of memory for gathering running statistics – the heap is now used instead of the stack.
141* Cleaned up the display of statistics for backends that do not implement active synchronisation, e.g. the `pipe` and `STDOUT` back ends.
142* Cleaned up the `audio_backend_silent_lead_in_time` setting by adding an `"auto"` setting.
143* Improved synchronisation accuracy with short silence lead-ins.
144* While a player is active, the DACP port number to which to send remote commands should be broadcast over ZEROCONF/Bonjour. However, if that information is not available, Shairport Sync will now check for it every two seconds.
145* The timing software in the `sndio` backend does some extra sanity checking on certain time estimates, it may help a little when running on virtual machines.
8873923e 146* Open metadata and audio pipes with 666 permissions to allow them to be shared by other applications.
907f7b8b 147
15fd1d05
MB
148Version 3.3.6
149====
150**New Features**
151* Resampling has been added for the [Jack Audio](http://jackaudio.org) backend. This can be used to up-sample to 192kHz. Thanks to [Pieter De Gendt](https://github.com/pdgendt) for this addition.
152
153**Enhancements**
154* Add `SetAirplayVolume` to the native D-Bus `RemoteControl` interface.
155* Add `SetVolume` to the `MPRIS` interface.
156* Add a few sample commands, including `MPRIS` commands, to the [Sample D-Bus Commands](https://github.com/mikebrady/shairport-sync/blob/master/documents/sample%20dbus%20commands) document.
157
158
159**Bug Fixes**
d8debfc4 160* Add a `SIGCHLD` handler to remove completed processes that were used to perform program "hooks" without waiting for completion and thus prevent them from becoming zombie processes. Thanks to [patrickjane](https://github.com/patrickjane) for reporting the bug and for suggesting a solution. Addresses issue [#968](https://github.com/mikebrady/shairport-sync/issues/968).
15fd1d05
MB
161* Fix a bug in the provision of metadata which would on occasion cause metadata from the previous track to be provided. Thanks to [Tuomas Hämäläinen](https://github.com/tuomashamalainen) and [HiFiBerry](https://github.com/hifiberry) for reporting. This bugfix addresses issue [#972](https://github.com/mikebrady/shairport-sync/issues/972).
162* Make Shairport Sync compile in the forthcoming Fedora 32. Fedora 32 uses GCC-10 which [defaults to `-fno-common`](https://gcc.gnu.org/gcc-10/porting_to.html) exposing a number of issues with Shairport Sync – multiple definitions of some `enum`s and failure to define certain variables as `extern`. Many thanks to [Bill Peck](https://github.com/p3ck) for bringing this issue to notice. Address issue [#973](https://github.com/mikebrady/shairport-sync/issues/973).
163* Treat the `mper` (Persistent ID of a track) metadata attribute as the 64-bit item that it really is rather than a 32-bit item as hithereto. Output it as a hexadecimal number on the MPRIS and D-Bus interfaces to correspond with the format of the persistent id obtained from AppleScript. Thanks to to Scott Simon (https://github.com/zutroy97) for finding a related bug in the [shairport-sync-metadata-reader](https://github.com/mikebrady/shairport-sync-metadata-reader).
164* Hook up the `Volume` property in the `MPRIS` interface.
165* Fix an incompatibilty with Forked Daapd that was causing Forked Daapd to lock up. Thanks to [@tomgadow](https://github.com/tomgadow) and [@ejurgensen](https://github.com/ejurgensen) for their help in finding and (hopefully) fixing this issue. Addresses issue [#953](https://github.com/mikebrady/shairport-sync/issues/953) and [Forked Daapd Issue #870](https://github.com/ejurgensen/forked-daapd/issues/870).
166* Other minor bug fixes.
167
168**Pesky Changes You Might Not Be Able To Ignore**
169* Renamed the `Server` property in the D-Bus interface to `Client`. The rather strange language in use has it that a player like iTunes is a "client" of the AirPlay device like Shairport Sync, which is therefore considered the "server". The newly-renamed "Client" property is the IP number of the player.
170
86672a61 171Version 3.3.5
a5249e7b 172====
2024ac8b 173
86672a61 174**Bug Fixes**
0b712236 175* Fix a crashing bug if output format `S24` was chosen. Thanks to [artenverho](https://github.com/artenverho) for reporting. Fixes Issue [#927](https://github.com/mikebrady/shairport-sync/issues/927).
86672a61
MB
176* Fix a bug whereby if `Loudness` was enabled through the D-Bus interface, the output would be muted until the volume was changed.
177
178**Enhancements**
0b712236 179* D-Bus interface enhancements: add `Convolution`, `ConvolutionGain` and `ConvolutionImpulseResponseFile` properties to the D-Bus interface. These properties can be set and changed at any time, even while playing. Implements the suggestion in Issue [#929](https://github.com/mikebrady/shairport-sync/issues/929). Thanks to [corrpel](https://github.com/corrpel) for the suggestion.
86672a61
MB
180* Update the [sample dbus commands](https://github.com/mikebrady/shairport-sync/blob/master/documents/sample%20dbus%20commands) document.
181
182**Pesky Changes**
183* D-Bus interface change: the D-Bus `LoudnessFilterActive` property has been changed to `Loudness`. The sample D-Bus client has been updated accordingly.
184
185Version 3.3.4
186====
15cb5479 187
2024ac8b
MB
188This is Version 3.3.3 with a small compilation error fixed.
189
190Version 3.3.3
191====
192
a5249e7b
MB
193**Bug Fixes**
194* Fixes a deferred crash that occurred in Ubuntu 14.04: the `shairport-sync` daemon would silently die after a fairly long period. It typically happened just after a DHCP address was renewed. The problem seemed to be related to having more than one `avahi` threaded polling loop (though this isn't documented anywhere). The fix was to consolidate the `avahi` stuff down to one threaded polling loop. Addresses issue [#895](https://github.com/mikebrady/shairport-sync/issues/895). Thanks to [Hans (the) MCUdude](https://github.com/MCUdude) for reporting and for initial troubleshooting.
195
196* Fixes a potential crash when an incomplete `fmtp` parameter set is sent by the requesting client. Thanks to [Angus71](https://github.com/Angus71) for the fault report and for the repair.
197
198* Fixed a potential crash -- if a plain HTTP packet (in fact, any packet that didn't have an RTSP-style header) was sent to the TCP session port (usually port 5000), Shairport Sync would crash! Thanks to @[dubo-dubon-duponey](https://github.com/dubo-dubon-duponey) for reporting. Fixes [#921](https://github.com/mikebrady/shairport-sync/issues/921).
199
200* A fix ensures the hardware mixer of an `alsa` device is detected and initialised before responding to the first volume setting.
201
202* Fixes were made to the MPRIS and native D-Bus interfaces. In particular, situations where artwork is absent are better handled, and the remote interface and advanced remote interface `availability` properties should be more resilient in the face of network problems. Addresses issue [#890](https://github.com/mikebrady/shairport-sync/issues/890). Improvements were made to the detection of the remote services available when an audio source is playing. If the source is minimally compatible, e.g. iOS, Shairport Sync's `org.gnome.ShairportSync.RemoteControl` native `dbus` interface becomes "`available`". If the source is iTunes, then the `org.gnome.ShairportSync.AdvancedRemoteControl` interface also becomes `available`. Artwork, metadata, status and limited remote control facilities are accessible through these interfaces when they are in the `available` state. Thanks to [exoqrtx](https://github.com/exoqrtx) for bringing these issues to light and for testing.
203
204* Fixes an error whereby the `'pvol'`volume metadata was no longer sent if Shairport Sync was configured to ignore volume control information coming from the audio source. Addresses issue [#903](https://github.com/mikebrady/shairport-sync/issues/903). Thanks to [Jordan Bass](https://github.com/jorbas) for reporting the regression and for identifying the commit and code in which the regression occurred.
205
206**Enhancements**
207* Instead of returning `EXIT_FAILURE`, return `EXIT_WITH_SUCCESS` on early exit with either "version" (`–version` or `-V`) or "help" (`–help` or `-h`) arguments. Thanks to [Henrik Nilsson](https://github.com/henriknil) for the patch.
208
209* Normalises the `'pvol`' volume outputs so that when both the software and hardware attenuators are in use to extend the overall attenuation range, the maximum output level corresponds to the maximum output level of the hardware mixer.
210
211* Add the option of including the file and line number of each log entry's source. The option is on by default and is settable in the configuration file and in the `dbus` interface.
212
213* Rewrite the logic for identifying missing packets of audio and for asking for resends. It seems more robust -- there was a suspicion of the previous logic that resend requests were not made for some missing packets. In addition, requests for resends of continuous sequences of packets are rolled into one.
214
215* Expose the advanced settings controlling the resend request logic. The new settings are in the `general` section:
216 * `resend_control_first_check_time` is the time allowed to elapse before a packet is considered missing, defaulting to 0.1 sec. UDP packets don't always arrive in order and they don't need to be re-requested just because they arrive out of sequence. Essentially, therefore, this parameter is to prevent needless resend requests for packets that are already in transit.
217 * `resend_control_check_interval_time` is the interval between repeated requests for a missing packet, defaulting to 0.25 seconds.
218 * `resend_control_last_check_time` is the time by which the last check should be done before the estimated time of a missing packet's transfer to the output buffer, defaulting to 0.1 seconds. In other words, if a packet is still missing 0.1 seconds before it is due to be transferred to the DAC's output buffer, don't bother asking for a resend.
219
220* Exposes two advanced `metadata` settings related to handling cover art:
221 * The setting `cover_art_cache_directory` allows you to specify where cover art files will be cached if Shairport Sync has been built with native D-Bus, MPRIS or MQTT support. The default is `/tmp/shairport-sync/.cache/coverart`. If you set it to an empty list: `""`, caching is disabled. This might be useful in, say, an embedded device, or wherever you want to minimise file writing.
222 * The setting `retain_cover_art` is part of the `diagnostics` group. Set it to `"yes"` to retain cover art cached by the D-Bus, MPRIS or `mqtt` interfaces. Your directory may fill up if you leave it set!
223
224Version 3.3.2
225===
711d0bf6
MB
226**Bug Fixes**
227* Fix a bug that sometimes caused a crash when a service name was specified in the configuration file. The fix was to be more systematic in allocating and deallocating memory for temporary strings. Thanks to [Chris Boot](https://github.com/bootc), [Ari Sovijarvi](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925577#5), [Bernhard Übelacker](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925577#10) and [Jeroen Massar](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925577#17) for the bug report. Fixes [Debian Bug report #925577]( https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925577) and supercedes [Pull Request #879](https://github.com/mikebrady/shairport-sync/pull/879).
b4c54fc5 228* Correct some documentation typos – thanks again to [Chris Boot](https://github.com/bootc).
711d0bf6
MB
229
230**Enhancements**
231
232Add some settings for controlling the disable_standby_mode.
233* The first setting is the `disable_standby_mode_silence_threshold`, which is the amount of audio in the output device's hardware buffer. It should normally be close to the value given in the `audio_backend_buffer_desired_length_in_seconds` setting. If it drops to this value, silence is added to the buffer to prevent the output device from becoming idle.
234* The second new setting is the `disable_standby_mode_silence_scan_interval` which is the time between checks of the output device's hardware buffer.
235
236Version 3.3.1
237===
238
15cb5479
MB
239**Bug Fixes**
240* Fix a bug in the MQTT documentation and add sanity checking for the port chosen -- thanks to [David Crook](https://github.com/idcrook).
241* Fix a bug that caused manual format and rate setting to be ignored -- thanks to [Jörg Krause](https://github.com/joerg-krause).
242* Add missing support for format settings S24_LE, S24_BE, S32_LE and S32_BE.
243* Fix a bug that caused dither to be too loud.
3615b99f 244* Fix error message for invalid `disable_standby_mode` choice -- thanks to [Tim Curtis](https://github.com/moodeaudio) at [Moode Audio](https://moodeaudio.org).
15cb5479 245
529dd332
MB
246Version 3.3
247====
57f0b710 248Version 3.3 is focused on stability improvements and also offers a number of enhancements. Here is a selection of the most important:
529dd332
MB
249
250**Enhancements**
57f0b710 251* Automatic `alsa` output device speed and format selection. The greatest bit depth and the lowest multiple of 44,100 frames per second settings are chosen automatically by default. Manual selection is still available.
529dd332
MB
252* Automatic interpolation selection. If the CPU is fast enough, the better-quality `soxr` interpolation method is chosen. Otherwise `basic` interpolation is used. Manual selection is still available.
253* A new `active` state. New hooks are provided to execute programs before entering and after leaving the `active` state which covers sequences of play sessions separated by short intervals. This simplifies amplifier switch-on and switch-off, for example.
254* DAC crackle minimisation. This new feature is intended to minimise pops and crackles caused in some Digital to Analog Converters (DACs) when they transition between active and idle or standby operation. The new `alsa`-only `disable_standby_mode` prevents the DAC entering the standby mode by keeping it active, either permanently or while Shairport Sync is in the active state. This feature is switched off by default.
255* A new backend to interface Shairport Sync to [Jack Audio](http://jackaudio.org), thanks to the work of [Jörn Nettingsmeier](https://github.com/nettings).
256* A new [MQTT](https://en.wikipedia.org/wiki/MQTT) client interface, thanks to the work of [Till Zimmermann](https://github.com/tillz).
257* Changes in logging -- now you should add `-u` to direct log entries to STDERR (typically the console) rather than the system log. For example, to get logs of verbosity 1 to appear on the console: `$ shairport-sync -v -u`.
258* The help menu now lists all `alsa` output devices found.
259* Better support for big-endian CPUs.
260* Shairport Sync accepts AirPlay streams containing CD-quality uncompressed PCM.
261
262**Bug Fixes**
57f0b710 263* Lots of bugs – too many to list here – have been fixed that significantly improve the stability of Shairport Sync. The full list is in the Release Notes.
529dd332 264
57f0b710 265For more details of enhancements and bug fixes, please see the [Release Notes for 3.3](https://github.com/mikebrady/shairport-sync/releases/tag/3.3). Special thanks to [gibman](https://github.com/gibman).
529dd332 266
2d06a4bb 267Version 3.2.2
8e0c52d8 268====
2d06a4bb 269Please see the [Release Notes for 3.2](https://github.com/mikebrady/shairport-sync/releases/tag/3.2).
8e0c52d8 270
5e16fdbb 271**Enhancement**
2d06a4bb 272* Latency calculations have been updated to accommodate changes in iOS 12 and AirPlay connections from macOS Mojave. Thanks to [artenverho](https://github.com/artenverho) who first reported the issue.
5e16fdbb
MB
273
274* Formatting of the settings file `shairport-sync.conf` has been fixed, thanks to the work of [roblan](https://github.com/roblan).
275
c8dc7c06 276**Bug Fix**
2d06a4bb 277* Fixed a problem that prevented the `run_this_when_volume_is_set` script or program from running when the volume control is changed. Thanks to [shaven](https://github.com/shaven) for the report.
c8dc7c06 278
2d06a4bb 279Version 3.2.1
ef1fe0a5 280====
ef1fe0a5 281
709007f3 282**Bug Fix**
2d06a4bb 283* Fix a bug that was causing problems when `soxr` interpolation was chosen. Problems included instability during or after a play session and possibly an extremely slight click on very loud audio. Thanks are due to [hanaguro](https://github.com/hanaguro), [FnasBas](https://github.com/FnasBas), [priitohlo](https://github.com/priitohlo), [David Krmpotić](https://github.com/davidhq) and [artenverho](https://github.com/artenverho).
709007f3 284
2d06a4bb 285Version 3.2
a4d20530 286====
2d06a4bb 287Version 3.2 is equivalent to 3.2RC13.
dc46e160 288
2d06a4bb 289Version 3.2RC13
aed439fe 290====
2d06a4bb
MB
291**Adjustment**
292* Reduce the number of attempts that will be made to have a missing packet resent. It seems that in some situations on poor networks, the number of resend requests was causing problems.
aed439fe 293
2d06a4bb 294Version 3.2RC12
49700bb9
MB
295====
296**Enhancement**
2d06a4bb 297* Add a "ProgressString" property to the native D-Bus interface.
49700bb9
MB
298
299**Bug Fix**
2d06a4bb 300* Some code added in RC11 to monitor mutex lock times was causing some annoying issues -- fixed.
49700bb9 301
2d06a4bb 302Version 3.2RC11
cd85578b 303====
2d06a4bb 304**Bug Fixes**
cd85578b 305
4aeec6b2 306* Restore compatibility with Synology AudioStation/5.2. Thanks to [Jörg Krause](https://github.com/joerg-krause) for identifying both the issue itself and the likely location of the fix needed. It's not clear if the problem lies with Shairport Sync or Synology – the fix was to ensure that an RTSP reply was sent in one `SEND` call, which shouldn't be important.
2d06a4bb 307* Fix a bug that was causing Shairport Sync to hang very occasionally when a play session was ending. This seems to occur under rare circumstances, therefore many thanks to [David Krmpotić](https://github.com/davidhq) both for finding the problem and for his patience in trying out different theories before the bug was finally identified. More long-term work is probably needed here.
436e22c2 308
2d06a4bb 309Version 3.2RC10
0a10f0de 310====
2d06a4bb 311**Compatibility Adjustment**
0a10f0de 312
2d06a4bb
MB
313* Disable the use of all hardware mute mechanisms by default, for compatibility with other applications using the same output card.
314* Rename the `alsa` setting `mute_using_playback_switch` to `use_hardware_mute_if_available` and make it control volume-based mute as well as playback-switch-based mute.
0a10f0de 315
2d06a4bb 316Version 3.2RC9
d967bfc7
MB
317====
318**Bug Fix**
d967bfc7 319
2d06a4bb 320* Restore the correct pathname for the Shairport Sync PID file used in FreeBSD and System V Linux installations.
b25415ce 321
2d06a4bb 322Version 3.2RC8
a5e39ffd 323====
2d06a4bb 324**Bug Fixes**
d02f47e2 325
2d06a4bb 326* Fix a bug causing a play session to hang up on Cygwin 64. Fix a bug that might cause excessive resend requests. Fix a number of other (apparently) silent bugs.
4c79dac7 327
2d06a4bb 328Version 3.2RC7
52ecf48f 329====
2d06a4bb 330**Bug Fixes**
ef4a63d3 331
0083d457
MB
332* A very subtle bug that would occasionally cause a loud 80 millisecond buzz when a new track was selected has been located and fixed. Thanks to [mistipen](https://github.com/mistepien) and [artenverho](https://github.com/artenverho) for help with this.
333
2d06a4bb 334Version 3.2RC6
bee073e3 335====
2d06a4bb 336**Bug Fixes**
bee073e3 337
2d06a4bb 338* Restores audio sync with videos on older versions of iOS (prior to iOS 11.2) and macOS by restoring the old way of determining latency for clients identifying with AirPlay user agent strings having a version of 353 (iOS 11.1.2) or earlier. Thanks to [Mmoi-Fr](https://github.com/Mmoi-Fr) for help with this.
bee073e3 339
2d06a4bb 340Version 3.2RC5
4d7d6b34
MB
341====
342**Bug Fixes**
5f5047c7 343* When errors occur sending resend requests, back off for 0.5 seconds, rather than 10 seconds, and make the code actually work.
ca5b5f94 344* Make the configuration options for including the dbus interface and the mpris interface be `--with-dbus-interface` and `--with-mpris-interface` as expected, not `--with-dbus` and `--with-mpris` as they actually were.
4d7d6b34 345
2d06a4bb 346Version 3.2RC4
18c3b3af
MB
347====
348**Bug Fixes**
2d06a4bb 349* 3.2RC4 now sends resend requests (correctly) in the control channel rather than (incorrectly) over the audio channel as before. This makes it compatible with AirAudio and also makes it conform to the [Unofficial AirPlay Protocol Specification](https://nto.github.io/AirPlay.html). This bug went unnoticed for so long because other AirPlay sources accept resend requests in the audio channel. Thanks to [funtax](https://github.com/funtax) and to [Janusz Kowalczyk](https://github.com/kowalcj0) for bringing the issue to the fore.
18c3b3af 350
2d06a4bb 351Version 3.2RC3
77f32d98 352====
77f32d98 353**Enhancements**
2d06a4bb 354* Lost UDP packet resending code improved for better performance on busy or congested networks.
77f32d98 355
2d06a4bb
MB
356**Bug Fixes**
357* 3.2RC3 removes fixes some important and long-standing bugs that could make Shairport Sync less resilient on noisy or poor quality networks.
ce4495fa 358
2d06a4bb 359Version 3.2RC2
3999405c 360====
2d06a4bb
MB
361**Bug Fixes**
362* 3.2RC2 makes Shairport Sync work with AirAudio, removing a crashing bug, and includes some more debugging code.
05d84efc 363
2d06a4bb 364Version 3.2RC1
05d84efc
MB
365====
366**Enhancements**
b9cf91b2 367* 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 provide some metadata and some remote control. The native D-Bus interface permits remote control of the current AirPlay or iTunes client. It 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 control connection will be dropped.
2d06a4bb
MB
368* OpenBSD compatibility. Shairport Sync now compiles on OpenBSD -- please consult the OpenBSD note for details.
369* 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.
370* 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.
371However, with this enhancement, Shairport Sync can actually use this feature to mute the output where appropriate.
372* Added compatibility with [Swinsian](https://swinsian.com), a Mac music player.
373
374**Bug Fixes**
375* 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.
376* Much faster termination of a play session, leading to increased stability playing YouTube audio, etc.
377* Improved resynchronisation logic should improve performance with slow-to-download YouTube videos.
378* Dithering is now off when ignore_volume_control is true. Thanks to [yejun](https://github.com/yejun) for working on this.
d50e6ed5 379* Better compatibility with TuneBlade -- Shairport Sync honours the latency settings properly now.
2d06a4bb
MB
380* Fix timing error when using Airfoil as a source.
381* Better handling of missing timing packets.
382* Shairport Sync will now log an unexpectedy dropped or faulty RTSP connection. This might be useful on noisy networks.
383* 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.
384* 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](https://github.com/nbgl) for finding and fixing the bug.
385* A number of bug fixes due to [belboj](https://github.com/belboj). Many thanks for these!
386* Enhancements to the handling of quit requests by threads, thanks(again) to [belboj](https://github.com/belboj)!
3999405c 387
2d06a4bb
MB
388**Other Changes**
389* `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).
390* `pfls` and `prsm` metadata messages are less frequent, especially when a play session starts.
b9cf91b2 391* 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.
cfde64f3
MB
392* Only ask for missing packets to be resent once, and if any error occurs making the request, stop for 10 seconds.
393* Include the `-pthread` flag -- including the pthread library with `-lpthread` isn't always enough.
05d84efc
MB
394* Add optional timing annotations to debug messages -- see the new settings in the diagnostic stanza of the configuration file.
395
2d06a4bb
MB
396**Updated Documentation**
397* CAR INSTALL and OPENBSD notes added.
398* Improvements in the documentation relating to scripts -- thanks to [Niklas Janz](https://github.com/Alphakilo).
399* Typo fix! Thanks to [corbinsantin](https://github.com/corbinsantin).
c803a96f 400
05d84efc 401
05d84efc 402
2d06a4bb 403Version 3.1.7
05d84efc 404====
2d06a4bb 405* Stable 3.1.5 and 3.1.6 skipped to synchronise the shairport-sync.spec file contents with the release.
05d84efc 406
95e291e7 407**Enhancement**
b9cf91b2 408* The metadata 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.
05d84efc 409
2d06a4bb 410Version 3.1.4
05d84efc 411====
05d84efc 412
43cb36e9
MB
413**Security Update**
414
2d06a4bb 415* 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](https://bugs.launchpad.net/bugs/cve/2017-12087) and [Vulnerability in tinysvcmdns](https://bugs.launchpad.net/ubuntu/+source/shairport-sync/+bug/1729668).
7d51c06a 416Thanks and [Chris Boot](https://github.com/bootc) for fixing this bug.
43cb36e9 417
f27f4db9 418**Enhancement**
f2487c24 419* The metadata 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.
ca296107 420
7df55d8c
MB
421**Bug Fix**
422
2d06a4bb 423* 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](https://github.com/joerg-krause) for locating and fixing this bug.
7389ea80 424
2d06a4bb 425Version 3.1.3
02c5e494
MB
426====
427
2d06a4bb 428**Bug Fixes**
02c5e494
MB
429* Fixed a bug that prevented Shairport Sync from starting automatically on 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.
430
40e7b222 431Version 3.1.2
9556ae74
MB
432====
433
f174bdf9 434Shairport Sync is more stable playing audio from YouTube and SoundCloud on the Mac.
de5d5249 435
46bcb027
MB
436**Pesky Changes You Should Not Ignore**
437* When you update from a previous version of Shairport Sync, your output device may have been left in a muted state. You should use a command line tool like `alsamixer` or `amixer` to unmute the output device before further use.
3961fdd8
MB
438
439**Change of Default**
b9cf91b2 440* The default value for the `alsa` setting `mute_using_playback_switch` has been changed to `"no"` for compatibility with other audio players on the same machine. The reason is that when this setting is set to `"yes"`, the output device will be muted when Shairport Sync releases it. Unfortunately, other audio players using the output device expect it to be unmuted, causing problems. Thanks to [Tim Curtis](https://github.com/moodeaudio) at [Moode Audio](http://moodeaudio.org) and [Peter Pablo](https://github.com/PeterPablo) for clarifying the issue.
3961fdd8 441
fe6ae61d 442**Bug Fixes**
46bcb027
MB
443* Fixed bugs that made Shairport Sync drop out or become unavailable when playing YouTube videos, SoundCloud streams etc. from the Mac. Background: there has been a persistent problem with Shairport Sync becoming unavailable after playing, say, a YouTube clip in a browser on the Mac. Shairport Sync 3.1.2 incorporates a change to how certain AirPlay messages are handled. Introduced in nascent form in 3.1.1, further follow-on changes have improved the handling of player lock and have simplified and improved the handling of unexpected loss of connection. Shairport Sync also now works properly with SoundCloud clips played in a browser on the Mac.
444* Using [infer](https://github.com/facebook/infer/blob/master/README.md), a number of silent issues have been detected, such as not checking some calls to `malloc` to ensure the response is not NULL. Most of these have been addressed by additional checks.
98155b00
MB
445
446Version 3.1.1
d5ba5827
MB
447====
448
449**Bug Fixes**
450* A bug in the `sndio` backend has been fixed that caused problems on some versions of Linux.
451* A change has been made to how Shairport Sync responds to a `TEARDOWN` request, which should make it respond better to sequences of rapid termination and restarting of play sessions. This can happen, for example, playing YouTube videos in Safari or Chrome on a Mac.
452* Choosing `soxr` interpolation in the configuration file will now cause Shairport Sync to terminate with a message if Shairport Sync has not been compiled with SoX support.
453* Other small changes.
454
5e8e63cc 455Version 3.1
aed8f0d5 456====
46f5632a 457Version 3.1 brings two new backends, optional loudness and convolution filters, improvements in non-synchronised backends, enhancements, stability improvements and bug fixes.
aed8f0d5
MB
458
459**New Features**
41f00192 460* A `sndio` backend gives Shairport Sync native fully synchronised output on OpenBSD and FreeBSD, thanks to the work of [Tobias Kortkamp (t6)](https://github.com/t6).
f8b52725
MB
461* A `pa` backend now allows Shairport Sync to provide synchronised output on PulseAudio-equipped systems -- many desktop Linuxes use PulseAudio as their sound manager.
462* Optional loudness and convolution filters can be incorporated in the audio processing chain, thanks to the fantastic work of [yannpom](https://github.com/yannpom).
c677ad48 463* A volume-change program hook `run_this_when_volume_is_set` has been added to the `general` settings stanza to execute an application whenever the volume is changed.
aed8f0d5 464
c677ad48 465**Pesky Changes You Should Know About**
aed8f0d5 466* The `audio_backend_buffer_desired_length_in_seconds` and `audio_backend_latency_offset_in_seconds` settings have been moved from individual backend stanzas to the `general` stanza. They now have an effect on every type of backend.
b9cf91b2 467* If you are using a System V (aka `systemv`) installation, please note that the default location for PID file has moved -- it is now stored at `/var/run/shairport-sync/shairport-sync.pid`. This change is needed to improve security a little and to improve compatibility across platforms. If you're not doing anything strange, this should make no difference.
aed8f0d5 468
aed8f0d5
MB
469**Enhancements**
470* Resynchronisation, which happens when the synchronisation is incorrect by more than 50 ms by default, should be a lot less intrusive when it occurs – it should now either insert silence or skip frames, as appropriate.
471* The Linux installer has been improved and simplified and a FreeBSD installer introduced.
472* A new setting, `audio_backend_silent_lead_in_time`, allows you to set the duration of the period of silence played (the "silent lead-in") before a play session starts.
473* A new command-line option, `--logOutputLevel`, allows you to output the volume levels to the log whenever they are changed. This may be useful during setup.
474* Improvements have been made to the handling of large items of metadata over UDP.
d72bcca3 475* A new command line option, `-j`, demonizes Shairport Sync without creating a PID file.
aed8f0d5 476* A new `alsa`-only setting, `mute_using_playback_switch`, is available for advanced use.
24091365 477* Other minor enhancements.
aed8f0d5
MB
478
479**Bug Fixes**
d72bcca3 480* Stability improvements. More care has been taken (!) to make code thread-safe, resulting in improved stability.
f4c6d110 481* Conversion from stereo to mono has been fixed to avoid clipping while preserving full resolution. Thanks to [Robert Jones (RobDeBagel)](https://github.com/RobDeBagel) for bringing this to notice.
d72bcca3 482* Short intrusions of audio at the start of a new session from the end of the previous session have been eliminated.
064b1022 483* Many (many!) miscellaneous bugs fixed.
aed8f0d5 484
25607ba1
MB
485Version 3.0.2
486====
487**Bug Fixes**
a8a2a255 488* Fixed bugs in the `ao`, `pulseaudio` and `sndio` back ends. Basically they were expecting default sample rate and depth information, and were terminating when they saw explicit rate and depth data.
25607ba1 489
0bbed3c8
MB
490Version 3.0.1
491====
492This update fixes one alarming and potentially very noisy bug and restores the identification of Shairport Sync as "ShairportSync" so that TuneBlade recognises it as an open source application.
493**Bug Fixes**
494* Fixed a bug that was causing Shairport Sync to possibly make a very loud and alarming noise whenever an audio frame was missing.
495* In 2.8.6, a change was made to the way Shairport Sync identified itself, so that it could be recognised by TuneBlade as an open source application and treated preferentially. That change was inadventently lost in the transition from 2.8.6 to 3.0. Now it's restored.
496
020f948b
MB
497Version 3.0
498====
499
500Big Update
501----
502Version 3 brings in support for 24-bit and 32-bit (and 8 bit!) DACs and for DACs running at multiples of 44,100 samples per second.
503
504The most obvious audible change is if you are using software volume control and can take advantage of 32- or 24-bit DACs. Dithering can now occur on a 32-bit or 24-bit sample rather than on a 16-bit sample, making the noise floor very much lower. This is the case, for example, with a Pimoroni PHAT DAC.
505
514b99f7
MB
506Here is the list of new features:
507
020f948b 508**New Features**
f4ed073c 509* 8-bit, 16-bit, 24-bit, 24-bit three-byte (S24_3LE and S24_3BE) and 32-bit output to ALSA devices.
020f948b
MB
510* 44,100, 88,200, 176,400 and 352,800 sample per second output. This is done using simple upsampling. It's only worth doing if 44,100 samples per second output is not available.
511* Internal processing including software volume control and interpolation is done after sample size and rate conversion.
f4ed073c 512* Apple ALAC decoder support. This needs the `libalac` library, available at [ALAC](https://github.com/mikebrady/alac), to be installed. Add the flag `--with-apple-alac` to the `./configure` arguments. Then you can choose the Apple ALAC decoder in the configuration file.
020f948b 513* Support for `mbed TLS` has been added and the use of `PolarSSL` is deprecated, as `mbed TLS` is a development of `PolarSSL` and `PolarSSL` itself is not being developed further.
020f948b
MB
514* Choose Network Interface. Add a new setting, for advanced users only, in the `general` section. Use the `interface` setting to allow you to specify the interface on which to provide the AirPlay service. Omit the setting to get the default, which is to choose the interfaces automatically.
515* Set Max Volume. Add a new setting, for advanced users only, in the `general` section. Use the `volume_max_db` setting to allow you to specify the maximum level to set on the hardware mixer (if chosen) or the built-in software mixer otherwise. The software mixer's range is 0.0 dB to -96.1 dB. The setting must be a number with a decimal point, e.g. 21.3.
516* An experimental new back end for `libsoundio`, a C library for cross-platform real-time audio input and output. Many thanks to [Serg Podtynnyi](https://github.com/shtirlic). Please see https://github.com/mikebrady/shairport-sync/pull/433 for more details.
517
518
519Pesky Changes You Cannot Ignore
520----
3a4c9d00 521* Processor load is up by about 11%.
020f948b 522* Settings have changed -- basically, any timings that were denominated in frames are now in seconds. Please refer to the shairport-sync.conf.sample file for details.
514b99f7 523* Sox-based interpolation at higher sample rates may overload your CPU -- you might have to choose between higher sample rates and sox-based interpolation.
020f948b
MB
524
525
9ed9821f 526Version 3.0rc0 – Release Candidate 0
b1723316 527----
020f948b 528Note: all Version 3 changes are summarized above.
b1723316 529
9ed9821f 530**New Feature**
6195a460 531* An experimental new back end for `libsoundio`, a C library for cross-platform real-time audio input and output. Many thanks to [Serg Podtynnyi](https://github.com/shtirlic). Please see https://github.com/mikebrady/shairport-sync/pull/433 for more details.
9ed9821f
MB
532
533**Other changes**
dea88acc 534* Updates to `man` page and [README](README.md). Reports of typos or suggestions for improvement are welcome!
9ed9821f
MB
535
536Version 3.0d24 – Development Version
537----
020f948b 538Note: all Version 3 changes are summarized above.
9ed9821f 539
b1723316 540**New Feature**
4547d087
MB
541* Set Max Volume. Add a new setting, for advanced users only, in the `general` section. Use the `volume_max_db` setting to allow you to specify the maximum level to set on the hardware mixer (if chosen) or the built-in software mixer otherwise. The software mixer's range is 0.0 dB to -96.1 dB. The setting must be a number with a decimal point, e.g. 21.3.
542
543Version 3.0d23 – Development Version
544----
020f948b 545Note: all Version 3 changes are summarized above.
4547d087
MB
546
547**New Feature**
548* Choose Interface. Add a new setting, for advanced users only, in the `general` section. Use the `interface` setting to allow you to specify the interface on which to provide the AirPlay service. Omit the setting to get the default, which is to choose the interfaces automatically.
b1723316 549
1c82b464
MB
550Version 3.0d22 – Development Version
551----
020f948b 552Note: all Version 3 changes are summarized above.
1c82b464
MB
553
554**Bug Fix**
5c42d820 555* Fixed a bug which prevented successful building in the OpenWrt build system. The problem was caused by an `#include apple_alac.h` in `player.c` which was actioned even if the apple alac decoder was not selected. This caused the OpenWrt build system to expect the standard C++ library – required by the apple alac code – to be referenced, but it was not specified on the build manifest and therefore stopped the build. The solution was to make the `#include` conditional on selecting the apple alac decoder.
1c82b464 556
e8dcd8b9
MB
557Version 3.0d21 – Development Version
558----
020f948b 559Note: all Version 3 changes are summarized above.
e8dcd8b9
MB
560
561**Bug Fix**
562* Fixed a bug which turned off resync by default. Duh.
563
564Version 3.0d20 – Development Version
565----
020f948b 566Note: all Version 3 changes are summarized above.
e8dcd8b9
MB
567
568**Bug Fix**
b9cf91b2 569* Fix a small and generally silent error in configure.ac so that it only looks for the systemd directory if systemd has been chosen. It caused a warning when cross-compiling.
e8dcd8b9 570
16c3ba5e
MB
571Version 3.0d19 – Development Version
572----
020f948b 573Note: all Version 3 changes are summarized above.
16c3ba5e
MB
574
575**New Feature**
576* Reduces processor load back to V2.X levels by using a precalculated array of pseudorandom numbers to do dithering. Doesn't seem to make any audible difference.
577
fe309090 578Version 3.0d18 – Development Version
dbb71e66 579----
020f948b 580Note: all Version 3 changes are summarized above.
d9b28443
MB
581
582**New Features**
86a2902a
MB
583* 8-bit, 16-bit, 24-bit, 24-bit three-byte (S24_3LE and S24_3BE) and 32-bit output to ALSA devices. (Other back ends are not updated yet.)
584* 44,100, 88,200, 176,400 and 352,800 sample per second output. This is done using simple upsampling.
d9b28443
MB
585* Internal processing including software volume control and interpolation is done after sample size and rate conversion.
586* Apple ALAC decoder support. This needs the `libalac` library, available at [ALAC](https://github.com/mikebrady/alac). Add the flag `--with-apple-alac` to the `./configure` arguments. Then you can choose the Apple ALAC decoder in the configuration file.
fbf9757b 587* Support for `mbed TLS` has been added and the use of `PolarSSL` is deprecated, as `mbed TLS` is a development of `PolarSSL` and `PolarSSL` itself is not being developed further.
fe309090 588* Settings that were denominated in frames are now deprecated but still honoured. Deprecation warnings are issued.
d9b28443
MB
589
590Pesky Changes You Cannot Ignore
591====
86a2902a
MB
592* Settings have changed -- basically, any timings that were denominated in frames are now in seconds. Please refer to the shairport-sync.conf.sample file for details.
593* Sox-based interpolation at higher sample rates may overload your CPU -- yopu might have to choose between higher sample rates and sox-based interpolation.
d9b28443
MB
594
595**Bugs**
596* Documentation is not updated.
597
8fc9df88 598Version 2.8.6 – Stable Candidate
59c16806
MB
599----
600
8fc9df88 601**Enhancements**
45261398 602* This release contains a small change – it identifies itself as a ShairportSync device rather than an AirPort device. This should make it possible for Tuneblade, and possibly other players, to recognise it correctly.
8fc9df88 603
2dd73ec1
MB
604Version 2.8.5 – Stable Version
605----
606This release includes bug fixes and minor enhancements and is recommended for all users.
607
f012acb8 608Note: if you're upgrading, there is a new `./configure` option:
2dd73ec1 609====
481f1700 610The build process now uses the directory path `sysconfdir` to determine where to place the configuration file `shairport-sync.conf`.
2dd73ec1 611The default value for `sysconfdir` is `/usr/local/etc` which is used in the BSD family, whereas `/etc` is normally used in Linux.
481f1700
MB
612To retain the present behaviour of Shairport Sync, *you must add an extra parameter to the `./configure... ` command.* The parameter you must add is `--sysconfdir=/etc`. (This has been added to the sample configuration command line in README.md.)
613
614The enhancements and bug fixes in 2.8.5 were made in versions 2.8.4.1 to 2.8.4.8 inclusive. Please read below for the full list.
2dd73ec1 615
a56d103e
MB
616Version 2.8.4.8 – Development Version
617----
618**Enhancements**
619* Add a new metadata item `clip` (for `CL`ient `IP`). This item is a string comprising the IP number of the "client", and is sent when a play session is starting. The "client" is the sender of the audio stream, e.g. iTunes on a Mac, or the Music player in iOS.
620* When synchronisation has been disabled on the ALSA device (you should only do this for testing), Shairport Sync now refrains from asking for buffer length information from the device.
621
303c96bc
MB
622Version 2.8.4.7 – Development Version
623----
303c96bc 624
572edc54
MB
625* This update means the build process now uses the directory path `sysconfdir` to determine where to place the configuration file `shairport-sync.conf`. The default value for `sysconfdir` is `/usr/local/etc` which is used in the BSD family, whereas `/etc` is normally used in Linux. So, to retain the present behaviour of Shairport Sync, you must add an extra parameter to the `./configure... ` command. The parameter you must add is `--sysconfdir=/etc`. (This has been added to the sample configuration command line in README.md.)
626* Shairport Sync has been updated to use the value of `sysconfdir` to determine where to look for the configuration file. If `sysconfdir` has been left with its default value of `/usr/local/etc`, then Shairport Sync will look for `/usr/local/etc/shairport-sync.conf`. If, as recommended for Linux, `sysconfdir` has been set to `/etc`, then Shairport Sync will look, as before, for `/etc/shairport-sync.conf`.
627
628**Enhancement**
629* The version string output when you use the command-line option `-V` now includes the value of the `sysconfdir`, e.g. `2.8.4.7-OpenSSL-Avahi-ALSA-soxr-sysconfdir:/etc`.
303c96bc 630
8d7d43be
MB
631Version 2.8.4.6 – Development Version
632----
633**Enhancement**
634* Add a new `alsa` configuration setting: `use_mmap_if_available` to control the use of mmap. The default is `"yes"` -- see [#351](https://github.com/mikebrady/shairport-sync/issues/351).
635
d25e95bd
MB
636Version 2.8.4.5 – Development Version
637----
638**Enhancement**
8d7d43be 639* Handle varying packet lengths -- this makes it compatible with the HTC Connect, HTCs AirPlay implementation. Thanks to [Jörg Krause](https://github.com/joerg-krause) for his detective work, and see [#338](https://github.com/mikebrady/shairport-sync/issues/338).
d25e95bd 640
6bc1d12a 641Version 2.8.4.4 – Development Version
77b20535
MB
642----
643**Enhancement**
644* Use alsa direct access (mmap) feature to improve performance if mmap is supported. Thanks to [Yihui Xiong](https://github.com/xiongyihui).
645
7c02a50d
MB
646Version 2.8.4.3 – Development Version
647----
11b77b77 648**Bug Fix**
7c02a50d 649
18fe2b04 650* Set the RTSP socket to close on `exec()` of child processes; otherwise, background `run_this_before_play_begins` or `run_this_after_play_ends` commands that are sleeping prevent the daemon from being restarted because the listening RTSP port is still in use. Fixes [#329](https://github.com/mikebrady/shairport-sync/issues/329).
7c02a50d 651
539130cb 652Version 2.8.4.2 – Development Version
27d3959c
MB
653----
654**Bug Fixes**
655
539130cb 656* Fixed an issue where you could not compile the audio_pipe back end without enabling metadata support (thanks to [busa-projects](https://github.com/busa-projects) for reporting the issue).
27d3959c
MB
657* Fixed a few small issues causing compiler warnings in `mdns_dns_sd.c`.
658
539130cb
MB
659
660**Other**
661* Removed the INSTALL file – it's generated automatically by `autoreconf -fi` anyway – added it to the files to be ignored in `.gitignore` and added a simple `INSTALL.md` file.
662
90b4f714
MB
663Version 2.8.4.1 – Development Version
664----
665**Bug Fixes**
666
667* Fixed two issues when including support for `pulseaudio`.
668* Corrected two small errors in sample parameters for the UDP metadata stream settings, thanks to [rkam](https://github.com/rkam).
669
7eb7dbf8 670Version 2.8.4 – Stable Version
e4d49e27 671----
e4d49e27 672
280bec06
MB
673The following is a summary of the bug fixes and enhancements since version 2.8.3.
674
675**Bug Fixes**
676
7bd6703a 677* Checks have been added for empty or NULL audio buffers that were causing assertion violations and subsequent abnormal program termination.
280bec06 678
c1a2b3f7
MB
679* An IPv6 bug has been fixed — a bug in the networking software would not allow an IPv6 link-local connection to be made from a client if Shairport Sync was running on a device with more than one network interface. The solution was to take account of the `config_id` information.
680
7d69a141 681* Some problems have been fixed with the non-blocking write function used to write metadata.
280bec06 682
7d69a141 683* A bug in the volume control transfer function has been fixed, thanks to [Jörg Krause](https://github.com/joerg-krause).
f52f9965
MB
684
685**Enhancements**
686
280bec06
MB
687* Shairport Sync now works with [AllConnect/Streambels](http://allconnectapp.com) on Android with password protection. (As with all Android clients, you should set the `drift` to something large, like 500 or 1,000, as the timekeeping of these clients isn't as accurate as that of iTunes, etc.)
688
689* The networking subsystem has been modified to always use the same IP number during a session. Background: the computer Shairport Sync is running on can have many IP numbers active at the same time – various IPv6 numbers and also various IPv4 numbers. During a play session, when Shairport Sync has to create connections back to the source, it would use an automatically-assigned IP number for itself, but that number might not be same as the the number used earlier in the session. From now on, it will always use the same IP number it used when the connection was first established. Thanks to [ejurgensen](https://github.com/ejurgensen) for help with this.
690
f52f9965
MB
691* Experimental support has been added for a softvol plugin, thanks to the work of [Jörg Krause](https://github.com/joerg-krause) -- see [#293](https://github.com/mikebrady/shairport-sync/pull/293).
692
280bec06 693* A `playback_mode` setting has been added to allow the selection of `stereo` (default) or `mono` playback -- thanks to [faceless2](https://github.com/faceless2).
f52f9965 694
7d69a141 695* The new default service name is now the device's `hostname`, with its first character capitalised (ASCII only).
f52f9965
MB
696
697* Substitutions can now be made in the service name. The following substitutions can be used in the service name: `%h` for the `hostname`, `%H` for the `hostname` with the first letter capitalised, `%v` for the version number and `%V` for the full version string. Maximum length is 50 characters.
698
f52f9965
MB
699* An existing `shairport-sync.service` file will not be overwritten by `sudo make install`.
700
701* The text strings advertising the capabilities of Shairport Sync over Bonjour/Zeroconf/Avahi have been changed and now more closely match those of an AirPort Express Base Station (First Generation).
702
703* It is now possible to set the amount of time to wait for the metadata pipe to become ready for writing. The setting is called `pipe_timeout` in the `metadata` section. Default is 5,000 milliseconds.
704
280bec06 705* Metadata can now be provided via UDP -- thanks to [faceless2](https://github.com/faceless2).
f52f9965 706
280bec06 707* Statistics output is more machine readable -- thanks to [Jörg Krause](https://github.com/joerg-krause)
b9cf91b2 708* The `shairport-sync.spec` file has been updated for compatibility with building Debian packages using `checkinstall` -- thanks to [vru1](https://github.com/vru1).
e4d49e27 709
b269b94f
MB
710Version 2.8.3.11 – Development Version
711----
b269b94f
MB
712**Bug Fix**
713
36a76f8c 714Fixed some problems with the non-blocking write function used to write to the metadata pipe.
b269b94f 715
defba470
MB
716**Enhancement**
717
718It is now possible to set the amount of time to wait for the metadata pipe to become ready for writing. The setting is called `pipe_timeout` in the `metadata` section. Default is 5,000 milliseconds.
719
d657360c
MB
720Version 2.8.3.10 – Development Version
721----
722**Bug Fix**
723
2e28df28 724* Restored metadata feed lost in 2.8.3.7.
d657360c 725
dae0bccd 726Version 2.8.3.9 – Development Version
629c844e
MB
727----
728**Enhancements**
729
730* Substitutions can now be made in the service name, i.e. the name that appears in iTunes, etc. The following substitutions can be used in the service name you specify: `%h` for the hostname, `%H` for the hostname with the first letter capitalised, `%v` for the version number and `%V` for the full version string. Maximum length is 50 characters.
731
732* The new default service name is simply the hostname, with its first character capitalised.
733
734* An existing `shairport-sync.service` file will not be overwritten by `sudo make install`.
735
e337bf6c
MB
736Version 2.8.3.7 – Development Version
737----
e4642cbd 738**Enhancements**
e337bf6c 739
006b86c2 740* Shairport Sync now works with AllConnect/Streambels on Android with password protection. (As with all Android clients, you should set the `drift` to something large, like 500 or 1,000, as the timekeeping of these clients isn't as accurate as that of iTunes, etc.)
e337bf6c 741
e4642cbd 742* The text strings advertising the capabilities of Shairport Sync over Bonjour/Zeroconf/Avahi have been changed and now more closely match those of an AirPort Express Base Station (First Generation).
e337bf6c 743
0eaf97ab
MB
744Version 2.8.3.6 – Development Version
745----
746**Bug fix**
747
748An IPv6 link-local connection issue was fixed. A bug in the networking software would not allow an IPv6 link-local connection to be made from a client if Shairport Sync was running on a device with more than one network interface. The solution was to take account of the `config_id` information.
749
f5ee4c16
MB
750Version 2.8.3.5 – Development Version
751----
98607e55 752**Enhancement**
f5ee4c16
MB
753
754Experimental support for a softvol plugin, thanks to the work of [Jörg Krause](https://github.com/joerg-krause) -- see [#293](https://github.com/mikebrady/shairport-sync/pull/293).
755
756**Bug fix**
757
7bd6703a 758Add checks for empty or NULL audio buffers that seem to be causing assertion violations and subsequent abnormal program termination.
f5ee4c16 759
20b322a9 760Version 2.8.3.4 – Development Version
dc591cb0 761----
f5ee4c16 762
dc591cb0 763**Bug Fix**
dc591cb0 764
b20ea5fe 765The networking subsystem has been modified to always use the same IP number during a session. Background: the computer Shairport Sync is running on can have many IP numbers active at the same time – various IPv6 numbers and also various IPv4 numbers. During a play session, when Shairport Sync has to create connections back to the source, it would use an automatically-assigned IP number for itself, but that number might not be same as the the number used earlier in the session. From now on, it will always use the same IP number it used when the connection was first established. Thanks to [ejurgensen](https://github.com/ejurgensen) for help with this.
1b0c637f 766
3de20db8
MB
767
768Changed the `mono` setting for a `playback_mode` setting with two possible values: `stereo` (default) and `mono`.
dc591cb0 769
20b322a9
MB
770Version 2.8.3.3 – Deleted
771----
772
8f9a4319
MB
773Version 2.8.3.2 – Deleted
774----
775
5c5c2532
MB
776Version 2.8.3.1 – Development Version
777----
778Added a new `mono` setting -- thanks to [faceless2](https://github.com/faceless2). Documentation to follow.
779
18236516
MB
780Version 2.8.3 – Stable Version
781----
782A bug in 2.8.2 caused Avahi to fail at startup under some circumstances with older installations. The problem was that sometimes the `regtype` setting would not be initialised properly.
783
8020a54b
MB
784Version 2.8.2 – Stable Version
785----
786Version 2.8.2 is derived from development version 2.9.5.7 and has stability improvements, bug fixes and a few special-purpose enhancements.
787
788For full details, please refer to the release notes here, back as far as 2.8.1.
789
31ae47d0
MB
790Version 2.9.5.7 – Development Version
791----
792Version 2.9.5.7 contains general bug fixes and enhancements for some special situations.
68bef2a5 793
31ae47d0 794**Bug Fixes**
68bef2a5 795
31ae47d0
MB
796* Getting delay and latency information from the `alsa` subsystem has been improved -- bugs fixed, error codes handled better, arithmetic handling (hopefully) better.
797* If latency information is temporarily unavailable from the `alsa` subsystem, skip trying to synchronise until the next time.
798* Some condition variables and a mutex were uninitialised, yikes! Fixed.
799* A bug that set the output volume to maximum at the same time as muting the output has been fixed. AFAIK, this was inaudible, but it was scary looking.
800* Recover from name collisions in Avahi.
801* Detect and handle empty buffers better.
68bef2a5 802
31ae47d0 803**Enhancements**
68bef2a5 804
31ae47d0
MB
805* Turn off synchronisation. This is an advanced feature and generally leads to buffer underrun or overrun.
806* Set `alsa` buffer size and `alsa` period size. There are advanced features, mainly for debugging. They may be removed.
807* Change the Zeroconf/Bonjour `regtype` to enable Shairport Sync to continue to run but to be invisible to AirPlay clients. Special purpose usage only.
808* Output total number of packets and the play time of a session when statistics are enabled.
809
e1b64fdc
MB
810Version 2.9.4 – Development Version
811----
812Version 2.9.4 corrects some bugs in how Avahi error conditions are handled.
813
814**Bug Fix**
815* During operation, if the network disappeared, Avahi would occasionally report an error. This would cause Shairport Sync to attempt to terminate gracefully (which is the wrong thing to do in the circumstances). However, the termination attempt was actually causing an assertion violation crash. These errors are now simply logged.
816
817Version 2.9.3 – Development Version
818----
819Version 2.9.3 is 2.8.1 with documentation and version changes to indicate that it's in the development branch.
820
b269ad8a
MB
821Version 2.8.1 – Stable Version
822----
39e52899 823Version 2.8.1 is derived from development version 2.9.2 and has stability improvements and important bug fixes.
b269ad8a
MB
824
825For full details, please refer to the release notes here, back as far as 2.9.1.
826
ae604ff7
MB
827Version 2.9.2 – Development Version
828----
b9cf91b2 829Version 2.9.2 focuses on further bug fixes and stability improvements.
63d24a33 830* Enhanced stability: an important bug has been fixed in the handling of missing audio frames – i.e. what happens when a frame of audio is truly missing, after all attempts to fetch it have been unsuccessful. The bug would cause Shairport Sync to do an unnecessary resynchronisation, or, if resync was turned off, to jump out of sync. This is a long-standing bug – thanks to [Jörg Krause](https://github.com/joerg-krause) for identifying it.
ae604ff7
MB
831* An extra diagnostic has been added which gives the mean, standard deviation and maximum values for inter-packet reception time on the audio port. It may be useful for exploring line quality.
832
6b46bc9d
MB
833Version 2.9.1 – Development Version
834----
b9cf91b2 835Version 2.9.1 focuses on bug fixes and stability improvements.
d6b13018 836* Stability improvements are concentrated on what happens when a play sessions ends and is followed immediately by a new session. This happens in iOS 9.2 when you click to the next track or to the previous track. It also happens playing YouTube videos when a Mac's System Audio is routed through AirPlay. Thanks to [Tim Curtis](https://github.com/moodeaudio) for help with these issues.
6b46bc9d
MB
837* A workaround for an apparent flushing issue in TuneBlade has been included. Thanks to [gibman](https://github.com/gibman) for reporting this issue.
838* A number of bug fixes have been made to `configure.ac` – thanks to [Jörg Krause](https://github.com/joerg-krause).
839
c6b69847
MB
840Version 2.8 – Stable Version
841----
842Version 2.8 is derived from version 2.7.10 with slight documentation updates. Here is a summary of changes between the last stable version – 2.6 – and this version. For full details, refer to the release notes here, back as far as 2.7.
843
844**New Feature**
5b910b17 845* For hardware mixers with a restricted range (including many cheaper USB DACS), the general `volume_range_db` can be used to specify a wider range than the hardware provides – the extra range is provided by software.
c6b69847
MB
846
847**Enhancements**
848* The `man` manual and the html version of it are automagically rebuilt if `xml2man` and friends are available.
849* Volume-setting metadata is now sent even when the volume level is to be ignored by Shairport Sync itself.
850* Shairport Sync waits a little longer before asking for missing packets to be resent. Sometimes packets are just arriving slightly out of order and don't need to be asked for again.
851* The build scripts have been modified to be a little more compatible with standard practice.
852* A Continuous Integration (CI) system – Travis CI – is now used to do some limited build checking (thanks guys!).
853* Support added for compiling on Cygwin.
854* Added `rtptime` tags to metadata and picture metadata.
855* Replaced and improved the dither algorithm used with the software volume control. The new dither code gives a two bit peak-to-peak dither based on a Triangular Probability Distribution Function (TPDF).
856* Disabled picture sending if pictures haven’t been asked for.
857
858**Bug fixes**
ae604ff7
MB
859* Fixed a bug that prevented Shairport Sync from correctly setting the hardware mixer volume if it had been altered externally. Thanks to [Tim Curtis](https://github.com/moodeaudio) for help with these issues.
860* Modified the shutdown behaviour so that a shutdown followed immediately by a play request is handled better. This was causing iOS 9.2 sometimes to drop the Airplay link between tunes.
c6b69847
MB
861* Fixed a data-alignment bug that would cause a crash in certain circumstances on ARM processors with metadata enabled.
862* Corrected the names for a few settings tags.
863* Fixed some typos and misspellings.
864* Miscellaneous small bug fixes.
865
f9c264e3
MB
866Version 2.7.10 -- Development Version
867----
868**New Feature**
869* If the `ignore_volume_control` setting was `yes`, Shairport Sync really did ignore volume control settings and did not send any volume metadata (i.e. `pvol` coded metadata). Now, while continuing to ignore volume control settings, it sends a `pvol` token where the first number is the AirPlay volume, as before, but the remaining three parameters are set to zero.
870
8087624f
MB
871Version 2.7.9 -- Development Version
872----
873**Bug Fix**
874* Oops – brown-bag update. Fixed a crashing bug introduced in the last release, caused by not checking for a hardware mixer before trying to access it, duh.
875
623be1a5
MB
876Version 2.7.8 -- Development Version
877----
79581bc9 878**Bug Fix**
623be1a5
MB
879* Fixed an issue whereby Shairport Sync did not reset the hardware mixer volume level before resuming playing. The issue was caused by not releasing and later reaquiring the mixer when pausing and resuming. Thanks to [Tim Curtis](https://github.com/moodeaudio) for reporting the issue.
880
62206e8a 881Version 2.7.7 -- Development Version
77b1c2dd
MB
882----
883**Enhancements**
884* Add note about the Arch Linux Community repository package `shairport-sync`. Thanks to [Anatol Pomozov](https://github.com/anatol).
9337effe 885* Shairport Sync doesn't ask for packets to be resent quite so quickly -- it waits about half a second now before asking for missing packets to be resent.
77b1c2dd
MB
886
887**Bug Fixes**
9337effe
MB
888* Improved Shairport Sync's behaviour when it's asked to stop a play session and immediately start another. The signalling system used to stop threads was sometimes stopping threads belonging to the new session. This affected iOS 9.2 users going to the next track -- sometimes the player would become unavailable for an instant and disconnect the session. Th problem still happens occasionally.
889* Removed code favouring the use of "public" IPv6 addresses as source addresses when connecting to a distant IPv6 port – Neither OpenWrt nor FreeBSD can use it at present. Also, it's not clear if any problems are being caused by not favouring public IPv6 addresses.
77b1c2dd 890
647663ab
MB
891Version 2.7.6 -- Development Version
892----
893**Bug Fixes**
894* Look for the correct tag name for desired `ao` buffer length: `audio_backend_buffer_desired_length` rather than `audio_backend_buffer_desired_length_software`.
895* Fix a few FreeBSD compilation bugs.
a1ba8bc0 896* Fix a few documentation issues and typos. Thanks to [Chris Boot](https://github.com/bootc).
647663ab
MB
897
898**Enhancements**
a1ba8bc0 899* Add note about installing to Mac OS X. Thanks to [Serg Podtynnyi](https://github.com/shtirlic).
db52a7b1 900* Add automatic rebuild of manpage and html documentation when `xmltoman` and friends are available. Thanks to [Chris Boot](https://github.com/bootc).
9465dd88 901* Favour the use of "public" IPv6 addresses as source addresses when connecting to a distant IPv6 port.
647663ab 902
6a089774
MB
903Version 2.7.5 -- Development Version
904----
d4fbdacc
MB
905**New Features**
906* Ubuntu PPA files now available at https://launchpad.net/~dantheperson.
907
6a089774
MB
908**Enhancements**
909* Broaden the use of the value `$PREFIX` instead of the path `/usr/local/bin` during configuration. Thanks to [dantheperson](https://github.com/dantheperson).
910
25356fe1
MB
911Version 2.7.4 -- Development Version
912----
913**Enhancements**
b9cf91b2 914* Use the correct method for finding the `systemd` unit path, as recommended by Debian maintainers and
19362e97 915http://www.freedesktop.org/software/systemd/man/daemon.html#Installing%20Systemd%20Service%20Files. Thanks to [dantheperson](https://github.com/dantheperson).
6a089774 916* Rather than hardwire the path `/usr/local/bin` as the path to the shairport-sync executable, the value of `$PREFIX` is now used during configuration. Thanks to [Nick Steel](https://github.com/kingosticks).
2279cc46
MB
917* Add some extra diagnostic messages if the hardware buffer in the DAC is smaller than desired.
918* If metadata has been enabled, but if picture sending has not been requested and the source sends pictures anyway, omit them from the metadata feed. Thanks to [Jörg Krause](https://github.com/joerg-krause).
919
920**Bug Fixes**
921* Fixed a data alignment issue in the handling of metadata on some processors. Thanks to [Jörg Krause](https://github.com/joerg-krause).
922* Removed an `assert` which would terminate the program if a malformed packet of data was received.
923* Look for the correct tag name for desired alsa buffer length: `audio_backend_buffer_desired_length` rather than `audio_backend_buffer_desired_length_software`.
25356fe1 924
b5bff1c0
MB
925Version 2.7.3 -- Development Version
926----
927**Bug Fix**
2d06a4bb 928* The dither code was broken in Shairport Sync and was less than ideal anyway. It has been fixed and improved. Dither is added whenever you use the software volume control at less than full volume. See http://www.ece.rochester.edu/courses/ECE472/resources/Papers/Lipshitz_1992.pdf for a very influential paper by Lipshitz, Wannamaker and Vanderkooy, 1992. The dither code in Shairport Sync was inherited from Shairport and does not conform to the recommendations in the paper -- specifically the implementation would give one bit of dither where the paper recommends two bits peak-to-peak. The other thing is that the inherited dither code was actually broken in Shairport Sync. So, the new dither code gives a two bit peak-to-peak dither based on a Triangular Probability Distribution Function (TPDF). It sounds like a very low-level white noise, unmodulated by the audio material. It would be nice if it was even lower, but it's better than listening to the artifacts present when dithering is disabled.
b5bff1c0 929
54498519
MB
930Version 2.7.2 -- Development Version
931----
932**Bug Fix**
933* Fix a bug that suppressed output of the `rtptime` associated with metadata and with picture information coming from the audio source and passed on via the metadata pipe.
a8cfe689 934
54498519 935**Other Changes**
a8cfe689 936* Added some more information to the log whenever problems are detected with the proposed alsa device.
54498519
MB
937
938Version 2.7.1 -- Development Version
939----
940**Bug Fix**
941* The new volume-extension code was not correctly setting the volume after a pause / resume. Fixed.
942
cc2900aa
MB
943Version 2.7 -- Development Version
944----
30231258 945**New Features**
b9cf91b2 946* Extend the volume range for some DACs. Background: some of the cheaper DACS have a very small volume range (that is, the ratio of the highest to the lowest volume, expressed in decibels, is very small). In some really cheap DACs it's only around 30 dB. That means that the difference between the lowest and highest volume settings isn't large enough. With the new feature, if you set the `general` `volume_range_db` to more than the hardware mixer's range, Shairport Sync will combine the hardware mixer's range with a software attenuator to give the desired range. For example, suppose you want a volume range of 70 dB and the hardware mixer offers only 30 dB, then Shairport Sync will make up the other 40 dB with a software attenuator. One drawback is that, when the volume is being changed, there may be a slight delay (0.15 seconds by default) as the audio, whose volume may have been adjusted in software, propagates through the system. Another slight possible drawback is a slightly heavier load on the processor.
26cb5675 947* Check for underflow a little better when buffer aliasing occurs on very bad connections...
70d1fd38 948* Add extra debug messages to the alsa back end to diagnose strange DACs.
6ff36f56
MB
949* Add configuration file for the `libao` back end -- to change the buffer size and the latency offset, same as for stdout.
950* Add `shairport-sync.exe` to `.gitignore`.
d1a61a75 951* Add a check to support compilation on a CYGWIN platform.
ced68dd0
MB
952* Add `rtptime` tags to metadata and picture information and add two new metadata items to precede and follow the transmission of a picture. Background: it seems that metadata and picture information for the same item, e.g. a track, are normally tagged with a timestamp called the `rtptime`; if they refer to the same item, they will have the same `rtptime` tags. The update here is to add the `rtptime` value, if available, as data to the `mdst` and `mden` metadata items, which are sent before ("MetaData STart") and after ("MetaData ENd") a metadata sequence.
953In addition, similar tags -- `pcst` ("PiCture STart") and `pcen` ("PiCture ENd") are now sent before and after a picture with the `rtptime` value, if available, sent as data.
954By the way, the progress metadata (`prgr` for "PRoGRess"), which is sent just when a track starts, contains the same `rtptime` as its middle element.
cc2900aa
MB
955
956
957Version 2.6 -- Stable Version
715a5491
MB
958----
959This is basically version 2.4.2 with two small fixes. It's been bumped to 2.6 because (1) the new features added between 2.4.1 and 2.4.2 deserve more than just a bug-fix increment and (2) the development versions (2.5.x) should have lower numbers than the release versions, so that releases are always seen as upgrades. For example: 2.5.0.9 --> 2.6 looks like an upgrade, whereas 2.5.0.9 --> 2.4.2 looks like a downgrade.
960
961**Fixes**
962* For `systemd` users, the `shairport-sync.service` file is updated to point to the correct location of the shairport-sync application.
963* For Fedora users, the `shairport-sync.spec` file is updated to refer to 2.6.
964
965
1ebcb808 966Version 2.4.2
b3c2d97b 967----
b9cf91b2 968This release has important enhancements, bug fixes and documentation updates. It also appears to bring compatibility with Synology NAS devices.
b3c2d97b 969
9002212e 970
1ebcb808
MB
971**New Features**
972* Source-specified Latencies. Shairport Sync now uses the latencies specified by the audio source. Background: the AirPlay protocol used by Shairport Sync allows the audio source to specify the exact delay or latency that should be applied to the audio stream. Until now, Shairport Sync ignored this information and used fixed preset latencies that were selected on the basis of the "User-Agent" setting. Using source-specified latencies means that Shairport Sync is able adapt automatically to different sources.
1377c707 973Using source-specified latencies is now automatic unless non-standard static latencies have been specified in the configuration file or command line. Using non-standard latencies is usually done to compensate for delays in the back end of the system. For example, if the audio amplifier being driven by Shairport Sync has an inherent delay of its own -- as happens with many home theatre and surround sound systems -- then some users have reduced the latencies used by Shairport Sync to compensate. This usage is discouraged -- the `audio_backend_latency_offset` in the appropriate backend stanza (e.g. in the "alsa" stanza) should be used for this. Static latency settings are now deprecated, and will be removed in a future version of Shairport Sync.
1ebcb808
MB
974* Set Volume Range. This is a new setting that allows you to use just a portion of the full range of attenuation offered by a mixer. For example, if a mixer has a minimum volume of -80 dB and a maximum of +20 dB, you might wish to use only 60 dB of the 100 dB available. This might be because the sound becomes inaudible at the lowest setting and unbearably loud at the highest setting. It is for this reason that many domestic HiFi systems have a volume control range of only 60 to 80 dB.
975 Another possible reason to use this setting might be because the range specified by the mixer does not match the actual capabilities of the device. For example, the Raspberry Pi's DAC that feeds the built-in audio jack claims a range of 106 dB but has a useful range of only about 35dB. The new `volume_range_db` setting in the `general` stanza allows you to specify the maximum range from highest to lowest. The range suggested for the Raspberry Pi's built-in audio DAC, which feeds the headphone jack, is 35. Using it in this case gives the volume control a much more useful range of settings.
cb345056
MB
976
977**Bug fixes**
1ebcb808 978* Sometimes, especially when using Shairport Sync as a system output, it would not play the audio stream. This was caused by an improperly initialised variable. Fixed. Synology NAS devices now seem to be working with Shairport Sync.
cb345056 979* Fix in the `shairport.c`: the USE_CUSTOM_LOCAL_STATE_DIR macro was still being used when it should have been USE_CUSTOM_PID_DIR.
75f6fddd 980* Fix a crashing bug -- if metadata was enabled but a pipename was not supplied, boom.
cb345056 981
1377c707 982**Other Changes**
1ebcb808 983* Initial timing accuracy improved. The estimate of when to play the starting frame of the audio sequence has improved significantly. This leads to fewer corrections being needed at the start.
1377c707
MB
984* Volume ratios expressed in decibels are now consistently denominated in voltage decibels rather than power decibels. The rationale is that the levels refer to voltage levels, and power is proportional to the square of voltage.
985Thus a ratio of levels of 65535 to 1 is 96.3 dB rather than the 48.15 dB used before.
986* The latency figure returned to the source as part of the response to an rtsp request packet is 11,025, which may (?) be meant to indicate the minimum latency the device is capable of.
b9cf91b2 987* An experimental handler for a GET_PARAMETER rtsp request has been added. It does nothing except log the occurrence.
1377c707
MB
988* The RTSP request dispatcher now logs an event whenever an unrecognised rtsp has been made.
989
b36dc710 990
b75f7073 991Version 2.4.1
0bf272fb 992----
8b72ddd2 993This release has three small bug fixes and some small documentation updates.
cb345056 994
b75f7073 995**Bug Fixes**
808fbc81 996
b75f7073
MB
997Changes from the previous stable version -- 2.4 -- are summarised here:
998 * The USE_CUSTOM_LOCAL_STATE_DIR macro was still being used when it should have been USE_CUSTOM_PID_DIR. This could affect users using a custom location for the PID directory.
b9cf91b2
CB
999 * A compiler error has been fixed that occurred if metadata was enabled and tinysvcmdns was included.
1000 * A crash has been fixed that occurred if metadata was enabled and a metadata pipe name was not specified.
8b72ddd2 1001(Thanks to the contributors who reported bugs.)
b75f7073
MB
1002
1003**Small Changes**
808fbc81 1004 * If a mixer being used to control volume does not have a control denominated in dB, a warning is logged and the mixer is not used.
b75f7073 1005 * Slight revisions have been made to the configuration file `configure.ac` to make compilation on FreeBSD a little easier.
0bf272fb 1006
24b83145
MB
1007Version 2.4
1008----
1009**Stable release**
1010
1011This stable release is the culmination of the 2.3.X sequence of development releases.
1012
1013**Change Summary**
1014
1015Changes from the previous stable version -- 2.2.5 -- are summarised here:
1016 * Settings are now read from a configuration file. Command-line settings are supported but discouraged.
1017 * Metadata is now supported -- it can be delivered to a unix pipe for processing by a helper application. See https://github.com/mikebrady/shairport-sync-metadata-reader for a sample metadata reader.
1018 * Raw PCM audio can be delivered to standard output ("stdout") or to a unix pipe. The internal architecture has changed considerably to support this.
1019 * Support for compilation on OpenWrt back to Attitude Adjustment.
0453080e
MB
1020 * Can play unencrypted audio streams -- complatible with, e.g. Whaale.
1021 * Uses the libconfig library.
24b83145
MB
1022 * Runs on a wider range of platforms, including Arch Linux and Fedora.
1023 * Bug fixes.
1024
1025Please note that building instructions have changed slightly from the previous version.
1026Also, the `-t hardware/software` option has been deprecated in the alsa back end.
1027
bc979a13
MB
1028Version 2.3.13
1029----
1030**Note**
1031* We're getting ready to release the development branch as the new, stable, master branch at 2.4. If you're packaging Shairport Sync, you might prefer to wait a short while as we add a little polish before the release.
1032
1033**Changes**
24b83145 1034* Harmonise version numbers on the release and on the `shairport.spec` file used in Fedora.
bc979a13 1035
8488f974
MB
1036Version 2.3.12
1037----
45b17a48
MB
1038**Note**
1039* We're getting ready to release the development branch as the new, stable, master branch at 2.4. If you're packaging Shairport Sync, you might prefer to wait a short while as we add a little polish before the release.
8488f974 1040
45b17a48 1041**Changes**
8488f974 1042* `update-rc.d` has been removed from the installation script for System V because it causes problems for package makers. It's now noted in the user installation instructions.
45b17a48 1043* The `alsa` group `mixer_type` setting is deprecated and you should stop using it. Its functionality has been subsumed into `mixer_name` – when you specify a `mixer_name` it automatically chooses the `hardware` mixer type.
8488f974 1044
45b17a48
MB
1045
1046**Enhancements**
b9cf91b2 1047* Larger range of interpolation. Shairport Sync was previously constrained not to make interpolations ("corrections") of more than about 1 per 1000 frames. This constraint has been relaxed, and it is now able to make corrections of up to 1 in 352 frames. This might result in a faster and undesirably sudden correction early during a play session, so a number of further changes have been made. The full set of these changes is as follows:
8488f974
MB
1048 * No corrections happen for the first five seconds.
1049 * Corrections of up to about 1 in 1000 for the next 25 seconds.
1050 * Corrections of up to 1 in 352 thereafter.
1051
45b17a48 1052**Documentation Update**
8488f974
MB
1053* Nearly there with updates concerning the configuration file.
1054
af36d8e4
MB
1055Version 2.3.11
1056----
1057Documentation Update
1058* Beginning to update the `man` document to include information about the configuration file. It's pretty sparse, but it's a start.
1059
586f4e72
MB
1060Version 2.3.10
1061----
8488f974
MB
1062Bug fix
1063* The "pipe" backend used output code that would block if the pipe didn't have a reader. This has been replaced by non-blocking code. Here are some implications:
586f4e72
MB
1064 * When the pipe is created, Shairport Sync will not block if a reader isn't present.
1065 * If the pipe doesn't have a reader when Shairport Sync wants to output to it, the output will be discarded.
b9cf91b2 1066 * If a reader disappears while writing is occurring, the write will time out after five seconds.
586f4e72
MB
1067 * Shairport Sync will only close the pipe on termination.
1068
bd5a89d4
MB
1069Version 2.3.9
1070----
1071* Bug fix
1072 * Specifying the configuration file using a *relative* file path now works properly.
1073 * The debug verbosity requested with `-v`, `-vv`, etc. is now honoured before the configuration file is read. It is read and honoured from when the command line arguments are scanned the first time to get a possible configuration file path.
1074
670dd933
MB
1075Version 2.3.8
1076----
04fadca4 1077* Annoying changes you must make
565d3458 1078 * You probably need to change your `./configure` arguments. The flag `with-initscript` has changed to `with-systemv`. It was previously enabled by default; now you must enable it explicitly.
670dd933
MB
1079
1080* Changes
07af6b10
MB
1081 * Added limited support for installing into `systemd` and Fedora systems. For `systemd` support, use the configuration flag `--with-systemd` in place of `--with-systemv`. The installation does not do everything needed, such as defining special users and groups.
1082 * Renamed `with-initscript` configuration flag to `with-systemv` to describe its role more accurately.
1083 * A System V startup script is no longer installed by default; if you want it, ask for it with the `--with-systemv` configuration flag.
670dd933 1084 * Added limited support for FreeBSD. You must specify `LDFLAGS='-I/usr/local/lib'` and `CPPFLAGS='-L/usr/local/include'` before running `./configure --with-foo etc.`
565d3458
MB
1085 * Removed the `-configfile` annotation from the version string because it's no longer optional; it's always there.
1086 * Removed the `dummy`, `pipe` and `stdout` backends from the standard build – they are now optional and are no longer automatically included in the build.
670dd933
MB
1087
1088* Bug fixes
565d3458
MB
1089 * Allow more stack space to prevent a segfault in certain configurations (thanks to https://github.com/joerg-krause).
1090 * Add missing header files(thanks to https://github.com/joerg-krause).
670dd933
MB
1091 * Removed some (hopefully) mostly silent bugs from the configure.ac file.
1092
a94c93d4
MB
1093Version 2.3.7
1094----
1095* Changes
1096 * Removed the two different buffer lengths for the alsa back end that made a brief appearance in 2.3.5.
a94c93d4
MB
1097* Enhancements
1098 * Command line arguments are now given precedence over config file settings. This conforms to standard unix practice.
1099 * A `–without-pkg-config` configuration argument now allows for build systems, e.g. for older OpenWrt builds, that haven't fully implemented it. There is still some unhappiness in arch linux builds.
a94c93d4
MB
1100* More
1101 * Quite a bit of extra diagnostic code was written to investigate clock drift, DAC timings and so on. It was useful but has been commented out. If might be useful in the future.
1102
9d1c0a55 1103Version 2.3.5
c4e88504 1104----
fced2eca
MB
1105* Changes
1106 * The metadata item 'sndr' is no longer sent in metadata. It's been replaced by 'snam' and 'snua' -- see below.
c4e88504 1107* Enhancements
fced2eca 1108 * When a play session is initiated by a source, it attempts to reserve the player by sending an "ANNOUNCE" packet. Typically, a source device name and/or a source "user agent" is sent as part of the packet. The "user agent" is usually the name of the sending application along with some more information. If metadata is enabled, the source name, if provided, is emitted as a metadata item with the type `ssnc` and code `snam` and similarly the user agent, if provided, is sent with the type `ssnc` and code `snua`.
2f0a9c01 1109 * Two default buffer lengths for ALSA -- default 6615 frames if a software volume control is used, to minimise the response time to pause and volume control changes; default 22050 frames if a hardware volume control is used, to give more resilience to timing problems, sudden processor loading, etc. This is especially useful if you are processing metadata and artwork on the same machine.
c4e88504 1110 * Extra metadata: when a play session starts, the "Active-Remote" and "DACP-ID" fields -- information that can be used to identify the source -- are provided as metadata, with the type `ssnc` and the codes `acre` and `daid` respectively. The IDs are provided as strings.
2f0a9c01 1111 * Unencrypted audio data. The iOS player "Whaale" attempts to send unencrypted audio, presumably to save processing effort; if unsuccessful, it will send encrypted audio as normal. Shairport Sync now recognises and handles unencrypted audio data. (Apparently it always advertised that it could process unencrypted audio!)
c4e88504
MB
1112 * Handle retransmitted audio in the control channel. When a packet of audio is missed, Shairport Sync will ask for it to be retransmitted. Normally the retransmitted audio comes back the audio channel, but "Whaale" sends it back in the control channel. (I think this is a bug in "Whaale".) Shairport Sync will now correctly handle retransmitted audio packets coming back in the control channel.
1113* Bugfixes
1114 * Generate properly-formed `<item>..</item>` items of information.
1115
10b5b27c
MB
1116Version 2.3.4
1117----
1118* Enhancement
1119 * When a play session starts, Shairport Sync opens three UDP ports to communicate with the source. Until now, those ports could be any high numbered port. Now, they are located within a range of 100 port locations starting at port 6001. The starting port and the port range are settable by two new general settings in `/etc/shairport-sync.conf` -- `udp_port_base` (default 6001) and `udp_port_range` (default 100). To retain the previous behaviour, set the `udp_port_base` to `0`.
1120* Bugfixes
1121 * Fix an out-of-stack-space error that can occur in certain cases (thanks to https://github.com/joerg-krause).
1122 * Fix a couple of compiler warnings (thanks to https://github.com/joerg-krause).
e9b36458 1123 * Tidy up a couple of debug messages that were emitting misleading information.
10b5b27c
MB
1124
1125Version 2.3.3.2
1126----
1127* Bugfix -- fixed an error in the sample configuration file.
1128
1129Version 2.3.3.1
1130----
1131* Enhancement
1132 * Metadata format has changed slightly -- the format of each item is now `<item><type>..</type><code>..</code><length>..</length><data..>..</data></item>`, where the `<data..>..</data>` part is present if the length is non-zero. The change is that everything is now enclosed in an `<item>..</item>` pair.
1133
1134Version 2.3.2 and 2.3.3
1135----
1136These releases were faulty and have been deleted.
1137
6de98c5b 1138Version 2.3.1
9c94547b 1139-----
c8fdbbd5 1140Some big changes "under the hood" have been made, leading to limited support for unsynchronised output to `stdout` or to a named pipe and continuation of defacto support for unsynchronised PulseAudio. Also, support for a configuration file in preference to command line options, an option to ignore volume control and other improvements are provided.
6de98c5b 1141
9c94547b 1142In this release, Shairport Sync gains the ability to read settings from `/etc/shairport-sync.conf`.
3a386a6a 1143This gives more flexibility in adding features gives better compatibility across different versions of Linux.
84eac6c5
MB
1144Existing command-line options continue to work, but some will be deprecated and may disappear in a future version of Shairport Sync. New settings will only be available via the configuration file.
1145
fd347fcb 1146Note that, for the present, settings in the configuration will have priority over command line options for Shairport Sync itself, in contravention of the normal unix convention. Audio back end command line options, i.e. those after the `--`, have priority over configuration file settings for the audio backends.
9c94547b
MB
1147
1148In moving to the the use of a configuration file, some "housekeeping" is being done -- some logical corrections and other small changes are being made to option names and modes of operations, so the settings in the configuration file do not exactly match command line options.
1149
6de98c5b 1150When `make install` is executed, a sample configuration is installed or updated at `/etc/shairport-sync.conf.sample`. The same file is also installed as `/etc/shairport-sync.conf` if that file doesn't already exist. To prevent the configuration files being installed, use the configuration option `--without-configfiles`.
9c94547b
MB
1151
1152* Pesky Change You Must Do Something About
312b72e5 1153
84eac6c5 1154If you are using metadata, please note that the option has changed somewhat. The option `-M` has a new long name equivalent: `--metadata-pipename` and the argument you provide must now be the full name of the metadata pipe, e.g. `-M /tmp/shairport-sync-metadata`.
9c94547b 1155
3d03e6c6 1156* Enhancements
fd347fcb 1157 * Shairport Sync now reads settings from the configuration file `/etc/shairport-sync.conf`. This has settings for most command-line options and it's where any new settings will go. A default configuration file will be installed if one doesn't exist, and a sample file configuration file is always installed or updated. Details of settings are provided in the sample file. Shairport Sync relies on the `libconfig` library to read configuration files. For the present, you can disable the new feature (and save the space taken up by `libconfig`) by using the configure option `--without-configfile-support`.
b0fd1ae2 1158 * New command-line option `-c <file>` or `--configfile=<file>` allows you to specify a configuration file other than `/etc/shairport-sync.conf`.
9c94547b
MB
1159 * Session Timeout and Allow Session Interruption can now be set independently. This is really some "housekeeping" as referred to above -- it's a kind of a bug fix, where the bug in question is an inappropriate connection of the setting of two parameters. To explain: (1) By default, when a source such as iTunes starts playing to the Shairport Sync device, any other source attempting to start a play session receives a "busy" signal. If a source disappears without warning, Shairport Sync will wait for 120 seconds before dropping the session and allowing another source to start a play session. (2) The command-line option `-t` or `--timeout` allows you to set the wait time before dropping the session. If you set this parameter to `0`, Shairport Sync will not send a "busy" signal, thus allowing another source to interrupt an existing one. (3) The problem is that if you set the parameter to `0`, a session will never be dropped if the source disappears without warning.
1160 The (obvious) fix for this is to separate the setting of the two parameters, and this is now done in the configuration file `/etc/shairport-sync.conf` -- please see the settings `allow_session_interruption` and `session_timeout`. The behaviour of the `-t` and `--timeout` command-line options is unchanged but deprecated.
460f8448 1161 * New Option -- "Ignore Volume Control" ('ignore_volume_control'). If you set this to "yes", the output from Shairport Sync is always set at 100%. This is useful when you want to set the volume locally. Available via the settings file only.
3d03e6c6 1162 * Statistics option correctly reports when no frames are received in a sampling interval and when output is not being synchronised.
77699fe9 1163 * A new, supported audio back end called `stdout` provides raw 16-bit 44.1kHz stereo PCM output. To activate, set `output_backend = "stdout"` in the general section of the configuration file. Output is provided synchronously with the source feed. No stuffing or stripping is done. If you are feeding it to an output device that runs slower or faster, you'll eventually get buffer overflow or underflow in that device. To include support for this back end, use the configuration option `--with-stdout`.
3d03e6c6
MB
1164 * Support for the `pipe` back end has been enhanced to provide raw 16-bit 44.1kHz stereo PCM output to a named pipe. To activate, set `output_backend = "pipe"` in the general section of the configuration and give the fully-specified pathname to the pipe in the pipe section of the configuration file -- see `etc/shairport-sync.conf.sample` for an example. No stuffing or stripping is done. If you are feeding it to an output device that runs slower or faster, you'll eventually get buffer overflow or underflow in that device. To include support for this back end, use the configuration option `--with-pipe`.
1165 * Support for the `dummy` audio backend device continues. To activate, set `output_backend = "dummy"` in in the general section of the configuration. To include support for this back end, use the configuration option `--with-dummy`.
1166 * Limited support for the PulseAudio audio backend continues. To activate, set `output_backend = "pulse"` in in the general section of the configuration. You must still enter its settings via the command line, after the `--` as before. Note that no stuffing or stripping is done: if the PulseAudio sink runs slower or faster, you'll eventually get buffer overflow or underflow.
1167 * New backend-specific settings are provided for setting the size of the backend's buffer and for adding or removing a fixed offset to the overall latency. The `audio_backend_buffer_desired_length` default is 6615 frames, or 0.15 seconds. On some slower machines, particularly with metadata processing going on, the DAC buffer can underflow on this setting, so it might be worth making the buffer larger. A problem on software mixers only is that changes to volume control settings have to propagate through the buffer to be heard, so the larger the buffer, the longer the response time. If you're using an alsa back end and are using a hardware mixers, this isn't a problem. The `audio_backend_latency_offset` allows you emit frames to the audio back end some time before or after the synchronised time. This would be useful, for example, if you are outputting to a device that takes 20 ms to process audio; yoou would specify a `audio_backend_latency_offset = -882`, where 882 is the number of frames in 20 ms, to compensate for the device delay.
9c94547b 1168
2e791032 1169Version 2.3
7785d36f 1170-----
9c94547b 1171* Enhancements
916d4c80 1172 * Adding the System V startup script (the "initscript") is now a configuration option. The default is to include it, so if you want to omit the installation of the initscript, add the configuration option `--without-initscript`.
e3e7d328 1173 * Metadata support is now a compile-time option: `--with-metadata`.
9c94547b 1174 * A metadata feed has been added. Use the option `-M <pipe-directory>`, e.g. `-M /tmp`. Shairport Sync will provide metadata in a pipe called `<pipe-directory>/shairport-sync-metadata`. (This is changed in 2.3.1.) There's a sample metadata reader at https://github.com/mikebrady/shairport-sync-metadata-reader. The format of the metadata is a mixture of XML-style tags, 4-character codes and base64 data. Please look at `rtsp.c` and `player.c` for examples. Please note that the format of the metadata may change.
3d03e6c6 1175Beware: there appears to be a serious bug in iTunes before 12.1.2, such that it may stall for a long period when sending large (more than a few hundred kilobytes) coverart images.
54366369 1176
e3e7d328 1177* Bugfix
d058f564 1178 * Fix a bug when compiling for Arch Linux on Raspberry Pi 2 (thanks to https://github.com/joaodriessen).
397aa277 1179 * Fix a bug whereby if the ANNOUNCE and/or SETUP method fails, the play_lock mutex is never unlocked, thus blocking other clients from connecting. This can affect all types of users, but particularly Pulseaudio users. (Thanks to https://github.com/jclehner.)
e3e7d328 1180 * Modify the init script to start after all services are ready. Add in a commented-out sleep command if users find it necessary (thanks to https://github.com/BNoiZe).
d8d4c88b 1181 * Two memory leaks fixed (thanks to https://github.com/pdgendt).
e3e7d328 1182 * An error handling time specifications for flushes was causing an audible glitch when pausing and resuming some tracks. This has been fixed (thanks to https://github.com/Hamster128).
7785d36f 1183
549e5e88
MB
1184Version 2.2.5
1185-----
1186* Bugfixes
1187 * Fix a segfault error that can occur in certain cases (thanks again to https://github.com/joerg-krause).
1188 * Include header files in common.c (thanks again to https://github.com/joerg-krause).
1189
7e403325
MB
1190Version 2.2.4
1191-----
1192* Bugfixes
1193 * Fix an out-of-stack-space error that can occur in certain cases (thanks to https://github.com/joerg-krause).
1194 * Fix a couple of compiler warnings (thanks to https://github.com/joerg-krause).
1195
266cfb7d 1196Version 2.2.3
7785d36f 1197-----
75b8c5c9 1198* NOTE: all the metadata stuff has been moved to the "development" branch. This will become the stable branch henceforward, with just bug fixes or minor enhancements. Apologies for the inconvenience.
49c27eb1 1199* Bugfixes
44ce5df9 1200 * Fix a bug when compiling for Arch Linux on Raspberry Pi 2 (thanks to https://github.com/joaodriessen).
e7ee5da1 1201 * Fix a compiler warning (thanks to https://github.com/sdigit).
7785d36f 1202
ab002d8f
MB
1203Version 2.2.2
1204-----
1205* Enhancement
1206 * An extra latency setting for forked-daapd sources -- 99,400 frames, settable via a new option `--forkedDaapdLatency`.
1207
cec82183
MB
1208Version 2.2.1
1209-----
1210* Bugfixes:
4fb4ec49 1211 * If certain kinds of malformed RTSP packets were received, Shairport Sync would stop streaming. Now, it generally ignores faulty RTSP packets.
cec82183 1212 * The `with-pulseaudio` compile option wasn't including a required library. This is fixed. Note that the PulseAudio back end doesn't work properly and is just included in the application because it was there in the original shairport. Play with it for experimentation only.
4fb4ec49 1213 * Fix typo in init.d script: "Headphones" -> "Headphone".
cec82183
MB
1214* Extra documentation
1215 * A brief note on how to compile `libsoxr` from source is included for the Raspberry Pi.
1216
6a936aa9
MB
1217Version 2.2
1218-----
1219* Enhancements:
3e9ec402 1220 * New password option: `--password=SECRET`
b9cf91b2 1221 * New tolerance option: `--tolerance=FRAMES`. Use this option to specify the largest synchronisation error to allow before making corrections. The default is 88 frames, i.e. 2 milliseconds. The default tolerance is fine for streaming over wired ethernet; however, if some of the stream's path is via WiFi, or if the source is a third-party product, it may lead to much overcorrection -- i.e. the difference between "corrections" and "net correction" in the `--statistics` option. Increasing the tolerance may reduce the amount of overcorrection.
6a936aa9 1222
e7cade39
MB
1223Version 2.1.15
1224-----
1225* Changes to latency calculations:
585b7327 1226 * The default latency is now 88,200 frames, exactly 2 seconds. It was 99,400 frames. As before, the `-L` option allows you to set the default latency.
e7cade39
MB
1227 * The `-L` option is no longer deprecated.
1228 * The `-L` option no longer overrides the `-A` or `-i` options.
8f56d9d1 1229 * The default latency for iTunes is now 99,400 frames for iTunes 10 or later and 88,200 for earlier versions.
e7cade39
MB
1230 * The `-i` or `--iTunesLatency` option only applies to iTunes 10 or later sources.
1231
377304dc
MB
1232Version 2.1.14
1233-----
e73dfa72 1234* Documentation update: add information about the `-m` audio backend option.
377304dc
MB
1235The `-m` audio backend option allows you to specify the hardware mixer you are using. Not previously documented.
1236Functionality of shairport-sync is unchanged.
1237
1238Version 2.1.13
1239-----
e73dfa72 1240* Compilation change: Begin to use PKG_CHECK_MODULES (in configure.ac) to statically link some of the libraries used by shairport-sync. It is intended to make it easier to build in the buildroot system. While sufficient for that purpose, note that PKG_CHECK_MODULES is not used for checking all the libraries yet.
377304dc
MB
1241Functionality of shairport-sync is unchanged.
1242
b9e433c2
MB
1243Version 2.1.12
1244-----
8d6d9e2e
MB
1245* Enhancement: `--statistics`
1246 Statistics are periodically written to the console (or the logfile) if this command-line option is included. They are no longer produced in verbose (`-v`) mode.
b9e433c2
MB
1247* Bugfixes for `tinysvcmdns`
1248 * A bug that prevented the device's IP number(s) and port numbers being advertised when using `tinysvcmdns` has been fixed. (Cause: name needed to have a `.local` suffix.)
1249 * Bugs causing the shairport service to semi-randomly disappear and reappear seem to be fixed. (Possible cause: incorrect timing settings when using `tinysvcmdns`.)
1250
2a53129e
MB
1251Version 2.1.11
1252-----
1253* Enhancement
7a56e2bb 1254 * A man page is now installed -- do `man shairport-sync` or see it here: http://htmlpreview.github.io/?https://github.com/mikebrady/shairport-sync/blob/2.1/man/shairport-sync.html.
2a53129e 1255
6b1e4d49
MB
1256Version 2.1.10
1257-----
1258* Bugfix
1259 * A bug that caused the `-t` timeout value to be incorrectly assigned has been fixed. (Cause: `config.timeout` defined as `int64_t` instead on `int`.)
1260
f78923e8
MB
1261Version 2.1.9
1262-----
1263* Bugfixes
1264 * A bug that sometimes caused the initial volume setting to be ignored has been fixed. (Cause: setting volume before opening device.)
1265 * a bug that caused shairport-sync to become unresponsive or unavailable has been fixed. (Cause: draining rather than flushing the alsa device before stopping.)
1266
1267Version 2.1.8:
1268-----
1269* Enhancements
1270 * (This feature is intended to be useful to integrators.) Shairport Sync now the ability to immediately disconnect and reconnect to the sound output device while continuing to stream audio data from its client.
1271Send a `SIGUSR2` to the shairport-sync process to disconnect or send it a `SIGHUP` to reconnect. If shairport-sync has been started as a daemon using `shairport-sync -d`, then executing `shairport-sync -D` or `--disconnectFromOutput` will request the daemon to disconnect, and executing `shairport-sync -R` or `--reconnectToOutput` will request it to reconnect.
1272With this feature, you can allow Shairport Sync always to advertise and provide the streaming service, but still be able to disconnect it locally to enable other audio services to access the output device.
1273
1274* Annoying things you should know about if you're updating from a previous version:
1275 * Options `--with-openssl`, `--with-polarssl` have been replaced with a new option `--with-ssl=<option>` where `<option>` is either `openssl` or `polarssl`.
b9cf91b2 1276 * Option `--with-localstatedir` has been replaced with `--with-piddir`. This compilation option allows you to specify the directory in which the PID file will be written. The directory must exist and be writable. Supersedes the `--with-localstatedir` and describes the intended functionality a little more accurately.
f78923e8
MB
1277
1278* Bugfixes
1279 * A small (?) bug in the flush logic has been corrected. Not causing any known problem.
1280
1281Version 2.1.5:
1282-----
1283* Enhancements
1284 * Adds a `--with-localstatedir` configuration option. When Shairport Sync is running as a daemon, it writes its Process ID (PID) to a file. The file must be stored in part of the file system that is writable. Most build systems choose an appropriate 'local state directory' for this automatically, but some -- notably `buildroot` -- don't always get it right for an embedded system. This compilation option allows you to specify the local state directory. Supersedes 2.1.4, which tried to do the same thing.
1285
1286Version 2.1.4:
1287-----
1288* Faulty -- withdrawn. 2.1.5 does it properly.
1289
1290
1291Version 2.1.3:
1292-----
1293* Stability Improvements
1294 * Fixed a bug which prevented Shairport Sync starting on an IPv4-only system.
1295
1296Version 2.1.2:
1297-----
1298* Stability Improvements
1299 * Improved buffering and flushing control, especially important on poor networks.
1300
1301
1302Version 2.1.1:
1303-----
1304* Enhancements
1305 * Add new -t or --timeout option. Normally, when playing audio from a source, the Shairport Sync device is unavailable to other devices requesting to play through it -- it returns a "busy" signal to those devices. If the audio source disappears without warning, the play session automatically terminates after a timeout period (default 120 seconds) and the device goes from being "busy" to being available for new play requests again. This option allows you to set that timeout period in seconds.
1306In addition, setting the timeout period to 0 means that play requests -- say from other devices on the network -- can interrupt and terminate the current session at any time. In other words, the "busy" feature of the device -- refusing connections from other players while playing from an existing source -- is turned off.
1307 * Allow -B and -E commands to have arguments, e.g. -B '/usr/bin/logger "Starting to play"' is now legitimate.
1308
1309* Annoying things you should know about if you're updating from 2.1:
1310 * Build now depends on the library libpopt -- see "Building and Installing" below.
1311
1312* Stability Improvements
1313 * Fixed a bug which would silence output after a few hours.
1314 * Tightened up management of packet buffers.
1315 * Improved estimate of lead-in silence to achieve initial synchronisation.
1316
1317Version 2.1:
1318-----
1319
1320* New features:
1321
1322 * Support for libsoxr, the SoX Resampler library -- see http://sourceforge.net/projects/soxr/. Briefly, Shairport Sync keeps in step with the audio source by deleting or inserting frames of audio into the stream as needed. This "interpolation" is normally inaudible, but it can be heard in some circumstances. Libsoxr allows this interpolation to be done much more smoothly and subtly. You can optionally include libsoxr support when building Shairport Sync. The big problem with libsoxr is that it is very compute intensive -- specifically floating point compute intensive -- and many embedded devices aren't powerful enough. Another issue is libsoxr is not yet in all linux distributions, so you might have to build it yourself. Available via the -S option.
1323 * Support for running (and optionally waiting for the completion of) programs before and after playing. See the -B, -E and -w options.
1324 * A new option to vary or turn off the resync threshold. See the -r option.
1325 * Version and build options. See the -V option.
1326 * Renamed program and init script. This is not exactly a big deal, but the name of the application itself and the default init script file have been renamed from "shairport" to "shairport-sync" to avoid confusion with other versions of shairport.
1327 * PolarSSL can be used in place of OpenSSL and friends.
1328
1329* Other stuff
1330 * Tinysvcmdns works as an alternative to, say, Avahi, but is now [really] dropped if you don't select it. Saves about 100k.
1331 * Lots of bug fixes.
1332
1333* Annoying things you should know about if you're updating from 2.0:
1334 * Compile options have changed -- see the Building and Installing section below.
1335 * The name of the program itself has changed from shairport to shairport-sync. You should remove the old version -- you can use `$which shairport` to locate it.
1336 * The name of the init script file has changed from shairport to shairport-sync. You should remove the old one.
1337
1338Version 2.0
1339----
1340
1341* New features:
1342 * Audio synchronisation that works. The audio played by a Shairport Sync-powered device will stay in sync with the source. This allows you to synchronise Shairport Sync devices reliably with other devices playing the same source. For example, synchronised multi-room audio is possible without difficulty.
1343 * True mute and instant response to mute and volume control changes -- this requires hardware mixer support, available on most audio devices. Without hardware mixer support, response is also faster than before -- around 0.15 seconds.
1344 * Smoother volume control at the top and bottom of the range.
1345 * Another source can not interrupt an existing source playing via Shairport Sync. it will be given a 'busy' signal.