diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..b7d5ff89 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: [paypal.me/UMBr] diff --git a/FFTConvolver/convolver.cpp b/FFTConvolver/convolver.cpp index f115cf85..3f08f0c6 100644 --- a/FFTConvolver/convolver.cpp +++ b/FFTConvolver/convolver.cpp @@ -5,8 +5,11 @@ #include "FFTConvolver.h" #include "Utilities.h" -extern "C" void die(const char *format, ...); -extern "C" void debug(int level, const char *format, ...); +extern "C" void _die(const char *filename, const int linenumber, const char *format, ...); +extern "C" void _debug(const char *filename, const int linenumber, int level, const char *format, ...); + +#define die(...) _die(__FILE__, __LINE__, __VA_ARGS__) +#define debug(...) _debug(__FILE__, __LINE__, __VA_ARGS__) static fftconvolver::FFTConvolver convolver_l; static fftconvolver::FFTConvolver convolver_r; diff --git a/INSTALL.md b/INSTALL.md index a5a61991..2d21b9c5 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,6 +1,6 @@ Simple Installation Instructions == -Here are simple instructions for building and installing Shairport Sync on a Raspberry Pi B, 2B, 3B or 3B+. It is assumed that the Pi is running Raspbian Stretch Lite – a GUI isn't needed, since Shairport Sync runs as a daemon program. For a more thorough treatment, please go to the [README.md](https://github.com/mikebrady/shairport-sync/blob/master/README.md#building-and-installing) page. +Here are simple instructions for building and installing Shairport Sync on a Raspberry Pi B, 2B, 3B, 3B+ or 4B. It is assumed that the Pi is running Raspbian Buster Lite – a GUI isn't needed, since Shairport Sync runs as a daemon program. For a more thorough treatment, please go to the [README.md](https://github.com/mikebrady/shairport-sync/blob/master/README.md#building-and-installing) page. In the commands below, note the convention that a `#` prompt means you are in superuser mode and a `$` prompt means you are in a regular unprivileged user mode. You can use `sudo` *("SUperuser DO")* to temporarily promote yourself from user to superuser, if permitted. For example, if you want to execute `apt-get update` in superuser mode and you are in user mode, enter `sudo apt-get update`. @@ -33,6 +33,12 @@ Remove it as follows: ``` Do this until no more copies of `shairport-sync` are found. +### Remove Old Startup Scripts +You should also remove the startup script files `/etc/systemd/system/shairport-sync.service` and `/etc/init.d/shairport-sync` if they exist – new ones will be installed in necessary. + +### Reboot after Cleaning Up +If you removed any installations of Shairport Sync or any of its startup script files in the last two steps, you should reboot. + ### Build and Install Okay, now let's get the tools and sources for building and installing Shairport Sync. diff --git a/README.md b/README.md index d9976d82..d9b5c8f7 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,9 @@ What else? * Metadata — Shairport Sync can deliver metadata supplied by the source, such as Album Name, Artist Name, Cover Art, etc. through a pipe or UDP socket to a recipient application program — see https://github.com/mikebrady/shairport-sync-metadata-reader for a sample recipient. Sources that supply metadata include iTunes and the Music app in iOS. * Compiles on Linux, Cygwin, FreeBSD, OpenBSD. * Outputs to [`alsa`](https://www.alsa-project.org/wiki/Main_Page), [`sndio`](http://www.sndio.org), [PulseAudio](https://www.freedesktop.org/wiki/Software/PulseAudio/), [JACK](http://jackaudio.org), to a unix pipe or to `STDOUT`. It also has limited support for [libao](https://xiph.org/ao/) and for [`soundio`](http://libsound.io). -* An [MPRIS](https://specifications.freedesktop.org/mpris-spec/2.2/) interface, partially complete and very functional, including access to metadata and artwork, and some remote control. +* An [MPRIS](https://specifications.freedesktop.org/mpris-spec/2.2/) interface, partially complete and very functional, including access to metadata and artwork, and some limited remote control. * An interface to [MQTT](https://en.wikipedia.org/wiki/MQTT), an often-used protocol in home automation projects. -* A native D-Bus interface, including access to metadata and artwork, some remote control and some system settings. +* A native D-Bus interface, including access to metadata and artwork, some limited remote control and some system settings. Heritage ------- @@ -93,7 +93,9 @@ If you wish to build and install the latest version of Shairport Sync on Debian, You should check to see if `shairport-sync` is already installed – you can use the command `$ which shairport-sync` to find where it is located, if installed. If it is installed you should delete it – you may need superuser privileges. After deleting, check again in case further copies are installed elsewhere. -You should also remove the initialisation script files `/etc/systemd/system/shairport-sync.service` and `/etc/init.d/shairport-sync` if they exist – new ones will be installed in necessary. +You should also remove the startup script files `/etc/systemd/system/shairport-sync.service` and `/etc/init.d/shairport-sync` if they exist – new ones will be installed in necessary. + +If you removed any installations of Shairport Sync or any of its startup script files, you should reboot. **Determine The Configuration Needed** @@ -240,7 +242,7 @@ SYNOPSIS ... ``` -If your system is definitely a `systemd` system, choose `--with-libdaemon --with-systemd` below. Otherwise, choose `--with-systemv`. +If your system is definitely a `systemd` system, choose `--with-systemd` below. Otherwise, choose `--with-libdaemon --with-systemv`. **Choose the location of the configuration file** @@ -248,7 +250,7 @@ A final consideration is the location of the configuration file `shairport-sync. **Sample `./configure` command with parameters for a typical Linux `systemd` installation:** -Here is a recommended set of configuration options suitable for Linux installations that use `systemd`, such as Ubuntu 15.10 and later, and Raspbian Stretch and Jessie. It specifies both the ALSA and PulseAudio backends and includes a sample configuration file and an script for automatic startup on system boot: +Here is a recommended set of configuration options suitable for Linux installations that use `systemd`, such as Ubuntu 15.10 and later, and Raspbian Buster, Stretch and Jessie. It specifies both the ALSA and PulseAudio backends and includes a sample configuration file and an script for automatic startup on system boot: `$ ./configure --sysconfdir=/etc --with-alsa --with-pa --with-avahi --with-ssl=openssl --with-metadata --with-soxr --with-systemd` diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 93daee34..bf18a9f6 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,6 +1,58 @@ +Version 3.3.4 +==== + +Please see the [Release Notes for 3.3](https://github.com/mikebrady/shairport-sync/releases/tag/3.3). + +This is Version 3.3.3 with a small compilation error fixed. + +Version 3.3.3 +==== + +**Bug Fixes** +* 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. + +* 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. + +* 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). + +* A fix ensures the hardware mixer of an `alsa` device is detected and initialised before responding to the first volume setting. + +* 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. + +* 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. + +**Enhancements** +* 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. + +* 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. + +* 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. + +* 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. + +* Expose the advanced settings controlling the resend request logic. The new settings are in the `general` section: + * `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. + * `resend_control_check_interval_time` is the interval between repeated requests for a missing packet, defaulting to 0.25 seconds. + * `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. + +* Exposes two advanced `metadata` settings related to handling cover art: + * 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. + * 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! + +Version 3.3.2 +=== +**Bug Fixes** +* 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). +* Correct some documentation typos – thanks again to [Chris Boot](https://github.com/bootc). + +**Enhancements** + +Add some settings for controlling the disable_standby_mode. +* 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. +* 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. + Version 3.3.1 === -Please see the [Release Notes for 3.3](https://github.com/mikebrady/shairport-sync/releases/tag/3.3). **Bug Fixes** * Fix a bug in the MQTT documentation and add sanity checking for the port chosen -- thanks to [David Crook](https://github.com/idcrook). diff --git a/UPDATING.md b/UPDATING.md index 31b87526..66916847 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -61,5 +61,5 @@ Your Shairport Sync should be upgraded now. ``` $ sudo amixer sset unmute ``` -Alternatively you can use `alsamixer`. A muted output has the letter(s) `M` as its value. Select it an type `M` again to unmute. +Alternatively you can use `alsamixer`. A muted output has the letter(s) `M` as its value. Select it and type `M` again to unmute. diff --git a/common.h b/common.h index bb6eedd1..58772f8b 100644 --- a/common.h +++ b/common.h @@ -158,7 +158,7 @@ typedef struct { int allow_session_interruption; int timeout; // while in play mode, exit if no packets of audio come in for more than this number // of seconds . Zero means never exit. - int dont_check_timeout; // this is used to maintain backward compatability with the old -t option + int dont_check_timeout; // this is used to maintain backward compatibility with the old -t option // behaviour; only set by -t 0, cleared by everything else char *output_name; audio_output *output; diff --git a/configure.ac b/configure.ac index 2ee37eea..848e9763 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.50]) -AC_INIT([shairport-sync], [3.3.3d11], [mikebrady@eircom.net]) +AC_INIT([shairport-sync], [3.3.5d0], [mikebrady@eircom.net]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([shairport.c]) AC_CONFIG_HEADERS([config.h]) @@ -298,7 +298,7 @@ AC_ARG_WITH(convolution, [ --with-convolution = choose audio DSP convolution su REQUESTED_CONVOLUTION=1 AM_INIT_AUTOMAKE([subdir-objects]) AC_DEFINE([CONFIG_CONVOLUTION], 1, [Needed by the compiler.]) - AC_CHECK_LIB([sndfile], [sf_open], , AC_MSG_ERROR(Convolution support requires the sndfile library!))], ) + AC_CHECK_LIB([sndfile], [sf_open], , AC_MSG_ERROR(Convolution support requires the sndfile library -- libsndfile1-dev suggested!))], ) AM_CONDITIONAL([USE_CONVOLUTION], [test "x$REQUESTED_CONVOLUTION" = "x1"]) # Look for dns_sd flag diff --git a/shairport-sync.spec b/shairport-sync.spec index bcc3b5b7..18773371 100644 --- a/shairport-sync.spec +++ b/shairport-sync.spec @@ -1,5 +1,5 @@ Name: shairport-sync -Version: 3.3.1 +Version: 3.3.4 Release: 1%{?dist} Summary: AirTunes emulator. Multi-Room with Audio Synchronisation # MIT licensed except for tinysvcmdns under BSD, @@ -66,6 +66,10 @@ getent passwd %{name} &> /dev/null || useradd --system -c "%{name} User" \ %license LICENSES %changelog +* Mon Oct 28 2019 Mike Brady