Skip to content

Commit 1230285

Browse files
committed
5.0.1
2 parents c956d76 + a68da65 commit 1230285

File tree

10 files changed

+199
-101
lines changed

10 files changed

+199
-101
lines changed

.github/workflows/docker-on-push-tag-or-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
uses: docker/setup-buildx-action@v3.12.0
7474

7575
- name: Build and push ${{ matrix.name }}
76-
uses: docker/build-push-action@v6.18.0
76+
uses: docker/build-push-action@v6.19.2
7777
env:
7878
registry_and_name: ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_IMAGE_NAME }}
7979
with:

.github/workflows/docker.yaml

Lines changed: 0 additions & 89 deletions
This file was deleted.

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
stale:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/stale@v10.1.1
14+
- uses: actions/stale@v10.2.0
1515
with:
1616
stale-issue-message: 'This issue has been inactive for 28 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.'
1717
stale-pr-message: 'This PR has been inactive for 28 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.'

configure.ac

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Process this file with autoconf to produce a configure script.
22

33
AC_PREREQ([2.50])
4-
AC_INIT([shairport-sync], [5.0rc0], [4265913+mikebrady@users.noreply.github.com])
4+
AC_INIT([shairport-sync], [5.0-post-dev], [4265913+mikebrady@users.noreply.github.com])
55
: ${CFLAGS="-O3"}
66
: ${CXXFLAGS="-O3"}
77
AM_INIT_AUTOMAKE([subdir-objects])
@@ -389,8 +389,6 @@ AC_ARG_WITH(mqtt-client, [AS_HELP_STRING([--with-mqtt-client],[include a client
389389
if test "x$with_mqtt_client" = "xyes" ; then
390390
AC_DEFINE([CONFIG_MQTT], 1, [Include a client for MQTT, the Message Queuing Telemetry Transport protocol])
391391
AC_CHECK_LIB([mosquitto], [mosquitto_lib_init], , AC_MSG_ERROR(MQTT support requires the mosquitto library -- libmosquitto-dev suggested!))
392-
systemd_after_args="${systemd_after_args} mosquitto.service"
393-
systemd_requires_args="${systemd_requires_args} mosquitto.service"
394392
fi
395393
AM_CONDITIONAL([USE_MQTT], [test "x$with_mqtt_client" = "xyes"])
396394

dacp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ void set_dacp_server_information(rtsp_conn_info *conn) {
474474
debug_mutex_unlock(&dacp_server_information_lock, 3);
475475
}
476476

477-
void dacp_monitor_port_update_callback(char *dacp_id, uint16_t port) {
477+
void dacp_monitor_port_update_callback(const char *dacp_id, uint16_t port) {
478478
debug_mutex_lock(&dacp_server_information_lock, 500000, 2);
479479
debug(3,
480480
"dacp_monitor_port_update_callback with Remote ID \"%s\", target ID \"%s\" and port "

dacp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void relinquish_dacp_server_information(rtsp_conn_info *conn); // tell the DACP
3131
// that the player thread is no
3232
// longer associated with it.
3333
void dacp_monitor_port_update_callback(
34-
char *dacp_id, uint16_t port); // a callback to say the port is no longer in use
34+
const char *dacp_id, uint16_t port); // a callback to say the port is no longer in use
3535

3636
int dacp_send_command(const char *command, char **body, ssize_t *bodysize);
3737
int send_simple_dacp_command(const char *command);

documents/D-Bus.md

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
## Shairport Sync D-Bus Interface
2+
3+
Shairport Sync can have a D-Bus interface, which can be used to control aspects of its operation and get status information from it.
4+
5+
To include the D-Bus interface at build time, add the `--with-dbus-interface` flag at the `./configure…` stage. When the D-Bus interface is included in Shairport Sync, its Version String will include the term `dbus`, for instance:
6+
```
7+
$ shairport-sync -V
8+
5.0.0-1-gc956d763-AirPlay2-smi10-OpenSSL-Avahi-ALSA-soxr-metadata-dbus-sysconfdir:/etc
9+
10+
```
11+
Once Shairport Sync has been built with the D-Bus interface, it must then be installed correctly to provide a Shairport Sync service either on the D-Bus `system` bus or the D Bus `session` bus.
12+
To become available as a system-wide service on the D-Bus `system` bus, it must be installed as a system service using the `# make install` step of the build process. This installs the appropriate service files and sets required permissions.
13+
Remember to enable Shairport Sync to start as a system service. You may also need to restart the entire system to allow the service to be seen.
14+
15+
If Shairport Sync is installed as a user service, it will not be able to become a service on the D-Bus `system` bus, but it can be added to the D-Bus `session` bus. Edit the configuration file to select the `session` bus, or add the option `--dbus_default_message_bus=session` to the command line.
16+
17+
### D-Feet
18+
On desktop Linuxes with a GUI, e.g. Ubuntu, D-Feet is a great tool for examining a D-Bus service:
19+
20+
![Shairport Sync and DFeet](https://github.com/user-attachments/assets/613dab83-9b02-4312-9ad1-c94db1d0ef49)
21+
22+
### Sample Test Client
23+
24+
A simple test client, written in C, can be built when you are building Shairport Sync itself. To build it, simply add the `--with-dbus-test-client` flag at the `./configure…` stage. Along with the `shairport-sync` executable application, you'll get another executable called `shairport-sync-dbus-test-client` which you can run from the command line.
25+
26+
After attempting to send some commands, it will listen for property changes on the D-Bus interface and report them on the console.
27+
28+
### Command Line Examples
29+
30+
The examples below are based on Shairport Sync running as a `system` service and use the standard CLI tool `dbus-send`:
31+
* Get `Active` Status -- `true` when Shairport Sync is playing (and for a short time later); `false` otherwise.
32+
```
33+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:Active
34+
```
35+
* Get Log Verbosity
36+
```
37+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.Diagnostics string:Verbosity
38+
```
39+
* Return Log Verbosity
40+
```
41+
$ echo `dbus-send --print-reply=literal --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.Diagnostics string:Verbosity`
42+
```
43+
* Set Log Verbosity to 2
44+
```
45+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync.Diagnostics string:Verbosity variant:int32:2
46+
```
47+
* Get Statistics-Requested Status
48+
```
49+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.Diagnostics string:Statistics
50+
```
51+
* Set Statistics-Requested Status to `true`
52+
```
53+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync.Diagnostics string:Statistics variant:boolean:true
54+
```
55+
* Are File Name and Line Number included in Log Entries?
56+
```
57+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.Diagnostics string:FileAndLine
58+
```
59+
* Include File Name and Line Number in Log Entries
60+
```
61+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync.Diagnostics string:FileAndLine variant:boolean:true
62+
```
63+
* Is Elapsed Time included in Log Entries?
64+
```
65+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.Diagnostics string:ElapsedTime
66+
```
67+
* Include Elapsed Time in Log Entries
68+
```
69+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync.Diagnostics string:ElapsedTime variant:boolean:true
70+
```
71+
* Get Drift Tolerance
72+
```
73+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:DriftTolerance
74+
```
75+
* Set Drift Tolerance to 1 millisecond
76+
```
77+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync string:DriftTolerance variant:double:0.001
78+
```
79+
* Is Loudness enabled:
80+
```
81+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:LoudnessEnabled
82+
```
83+
* Enable Loudness Filter
84+
```
85+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync string:LoudnessEnabled variant:boolean:true
86+
```
87+
* Get Loudness Threshold
88+
```
89+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:LoudnessThreshold
90+
```
91+
* Set Loudness Threshold
92+
```
93+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync string:LoudnessThreshold variant:double:-15.0
94+
```
95+
* Is Convolution enabled:
96+
```
97+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:ConvolutionEnabled
98+
```
99+
* Enable Convolution
100+
```
101+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync string:ConvolutionEnabled variant:boolean:true
102+
```
103+
* Get Convolution Gain:
104+
```
105+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:ConvolutionGain
106+
```
107+
* Set Convolution Gain -- the gain applied after convolution is applied -- to -10.0 dB
108+
```
109+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync string:ConvolutionGain variant:double:-10
110+
```
111+
* Get Convolution Impulse Response Files:
112+
```
113+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:ConvolutionImpulseResponseFiles
114+
```
115+
* Set Convolution Impulse Response Files:
116+
```
117+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync string:ConvolutionImpulseResponseFiles variant:string:"'/home/pi/filters/Sennheiser HD 205 minimum phase 48000Hz.wav', '/home/pi/filters/Sennheiser HD 205 minimum phase 44100Hz.wav'"
118+
```
119+
* Get Convolution Impulse Response File Maximum Length:
120+
```
121+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:ConvolutionMaximumLengthInSeconds
122+
```
123+
* Set Convolution Impulse Response File Maximum Length:
124+
```
125+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync string:ConvolutionMaximumLengthInSeconds variant:double:1
126+
```
127+
* Get the Protocol that Shairport Sync was built for -- AirPlay or AirPlay 2:
128+
```
129+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:Protocol
130+
```
131+
* Get the current volume level. This returns a value between -30.0 and 0.0, which is linear on the UI volume control. It can also return -144.0 to indicate mute.
132+
```
133+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:Volume
134+
```
135+
* Set the current volume level. This should be a value between -30.0 and 0.0. Set a value of -144.0 to mute. Note that all this is done locally on the Shairport Sync device itself. The volume control of audio source (e.g. iTunes / macOS Music / iOS) is not updated to reflect any changes.
136+
```
137+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync string:Volume variant:double:-10.0
138+
```
139+
* Drop the current session immediately. Shairport Sync will immediately stop playing and drop the connection from the audio source. This may show up as an error at the source.
140+
```
141+
$ dbus-send --system --print-reply --type=method_call --dest=org.gnome.ShairportSync '/org/gnome/ShairportSync' org.gnome.ShairportSync.DropSession
142+
```
143+
#### Remote Control
144+
Remote Control commands are sent as requests to the player (iOS, iTunes, macOS Music, etc.). Different versions of the players implement different subsets of the following commands.
145+
146+
**Note:** Unfortunately, at this time -- early 2026 -- these requests are ignored, so remote control doesn't work.
147+
148+
* Check if Remote Control is available:
149+
```
150+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.RemoteControl string:Available
151+
```
152+
* Send the `play` command to the player:
153+
```
154+
$ dbus-send --system --print-reply --type=method_call --dest=org.gnome.ShairportSync '/org/gnome/ShairportSync' org.gnome.ShairportSync.RemoteControl.Play
155+
```
156+
Remote Control commands include: `Play`, `Pause`, `PlayPause`, `Resume`, `Stop`, `Next`, `Previous`, `VolumeUp`, `VolumeDown`, `ToggleMute`, `FastForward`, `Rewind`, `ShuffleSongs`.
157+
158+
* Set Airplay Volume using Remote Control. Airplay Volume is between -30.0 and 0.0 and maps linearly onto the slider, with -30.0 being lowest and 0.0 being highest.
159+
```
160+
$ dbus-send --system --print-reply --type=method_call --dest=org.gnome.ShairportSync '/org/gnome/ShairportSync' org.gnome.ShairportSync.RemoteControl.SetAirplayVolume double:-10.0
161+
```
162+
#### Advanced Remote Control
163+
Some commands and properties are accessible only through the `AdvancedRemoteControl` interface.
164+
165+
**Note:** Unfortunately, at this time -- early 2026 -- these requests are ignored, so advanced remote control doesn't work.
166+
167+
* Check if Advanced Remote Control is available:
168+
```
169+
$ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.AdvancedRemoteControl string:Available
170+
```
171+
* Set Volume using Advanced Remote Control:
172+
```
173+
$ dbus-send --system --print-reply --type=method_call --dest=org.gnome.ShairportSync '/org/gnome/ShairportSync' org.gnome.ShairportSync.AdvancedRemoteControl.SetVolume int32:50
174+
```

documents/sample dbus commands

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
# For the "Native" Shairport Sync D-Bus Interface support, Shairport Sync must be built with the D-Bus interface support. Add the '--with-dbus-interface' flag at the ./configure stage.
1+
# For the "Native" Shairport Sync D-Bus Interface support, Shairport Sync must be built with the D-Bus interface support -- to do this, add the '--with-dbus-interface' flag at the ./configure stage.
2+
# Secondly, for the Shairport Sync interface to become available on the D-Bus system bus, Shairport Sync must be installed and running as a system service. The example below assume that it is installed and running as a system service.
23

34
# There is a simple test client that you can build -- add the '--with-dbus-test-client' flag at the ./configure stage. You'll get an executable called shairport-sync-dbus-test-client
45
# After attempting to send some commands, it will listen for property changes on the D-Bus interface and report them on the console.
56

67
# Additionally, the following are examples of using the CLI command "dbus-send" to send D-Bus commands to Shairport Sync:
78

9+
# Get "Active" Status -- true when Shairport Sync is playing (and for a short time later); false otherwise.
10+
dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync string:Active
11+
812
# Get Log Verbosity
913
dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.Diagnostics string:Verbosity
1014
# Return Log Verbosity

mdns_avahi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static void resolve_callback(AvahiServiceResolver *r, AVAHI_GCC_UNUSED AvahiIfIn
109109
// char a[AVAHI_ADDRESS_STR_MAX], *t;
110110
debug(3, "resolve_callback: Service '%s' of type '%s' in domain '%s':", name, type, domain);
111111
if (dbs->dacp_id) {
112-
char *dacpid = strstr(name, "iTunes_Ctrl_");
112+
const char *dacpid = strstr(name, "iTunes_Ctrl_");
113113
if (dacpid) {
114114
dacpid += strlen("iTunes_Ctrl_");
115115
while (*dacpid == '0')

0 commit comments

Comments
 (0)