From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 10 Oct 2022 11:11:53 +0000 (+0100) Subject: Add a section on adjusting sync to compensate for amplifier delays. Update the troubl... X-Git-Tag: 4.1-rc3~1^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65daef30c2d31b0ac726da2c131639d59329fbaf;p=thirdparty%2Fshairport-sync.git Add a section on adjusting sync to compensate for amplifier delays. Update the troubleshooting guide to point to it. --- diff --git a/ADVANCED TOPICS/AdjustingSync.md b/ADVANCED TOPICS/AdjustingSync.md new file mode 100644 index 00000000..cc4627f8 --- /dev/null +++ b/ADVANCED TOPICS/AdjustingSync.md @@ -0,0 +1,25 @@ +# Adjusting Synchronisation on Shairport Sync ("SPS") + +Sometimes, a timing difference can be heard, where the audio coming from the SPS-powered device is slightly ahead or slightly behind another device playing in synchrony. This can sometimes be heard as an irritating "echo". + +This is usually due to audio amplifier delays. + +* If your audio output device (including the amplifier in a TV) includes any digital processing component, it probably delays audio while amplifying it. + +* If your output device is a HDMI-connected device such as a TV or an AV Receiver (AVR), it will almost certainly delay audio by anything up to several hundred milliseconds. + +In these circumstances, if the output from the SPS device is amplified by a conventional analog-only HiFi amplifier – which has almost no delay – it will be early by comparison with audio coming the other device. + +Conversely, if the output from the SPS device is passed through an AVR, then it could be late by comparison with audio amplified by a conventional audio amplifier. + +The fix for this is to get Shairport Sync to compensate for delays by providing audio to the output device _slightly late_ or _slightly early_, so that when audio emerges from the amplifier, it is in exact synchrony with audio from the other devices. + +The setting to look for is in the `general` section of the Shairport Sync configuration file and is called `audio_backend_latency_offset_in_seconds`. By default it is `0.0` seconds. + +To delay the output from the SPS device by 100 milliseconds (0.1 seconds), set the `audio_backend_latency_offset_in_seconds` to `0.1`, so that audio is provided to your output device 100 milliseconds later than nominal synchronisation time. + +Similarly, to get the output from the SPS device 50 milliseconds (0.05 seconds) early, set the `audio_backend_latency_offset_in_seconds` to `-0.05`, so that audio is provided to your output device 50 milliseconds earlier than nominal synchronisation time. + +Latency adjustments should be small, not more than about ± 250 milliseconds. + +Remember to uncomment the line by removing the initial `//` and then restart Shairport Sync (or reboot the device) for the changed setting to take effect. diff --git a/ADVANCED TOPICS/README.md b/ADVANCED TOPICS/README.md index b5c3c232..19db0266 100644 --- a/ADVANCED TOPICS/README.md +++ b/ADVANCED TOPICS/README.md @@ -1,6 +1,7 @@ # Advanced Topics Here you will find links to some advanced features and things you can do with Shairport Sync. * [Finish Setting Up](InitialConfiguration.md). +* [Adjusting Sync](AdjustingSync.md) – advance or delay the timing of the output from Shairport Sync to compensate for amplifier delays. * [Get The Best](GetTheBest.md) from your system. * [Metadata](Metadata.md). * [Events](Events.md). diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 2bccf048..ad09ccb1 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -15,14 +15,8 @@ If you are using the default ALSA backend, don't forget to check two simple thin You can use `alsamixer` for both of theses checks. A muted output has the letter(s) `M` as its value. Select it and type `M` again to unmute. -### Audio is Delayed! -If the audio from your Shairport Sync device is delayed slightly by comparison with audio from other devices, it may be that the output device being fed by Shairport Sync is introducing a delay while it processes the audio. If your output device include any digital processing component, it probably delays the audio while it processing occurs. - -For instance, if your output device is a HDMI-connected device such as a TV or an AV Receiver, it will almost certainly delay audio by anything up to several hundred milliseconds. - -The fix for this is to ask Shairport Sync to provide the audio to the output device _slightly ahead of time_, so that by the time the output device has processed it, the audio emerges at exactly the right time. The setting to look for is in the `general` section of the Shairport Sync configuration file and is called `audio_backend_latency_offset_in_seconds`. By default it is `0.0` seconds. - -For example, if your output device is delaying audio by 100 milliseconds (0.1 seconds), set the `audio_backend_latency_offset_in_seconds` to `-0.1`, so that audio is provided to your output device 0.1 seconds early. Remember to uncomment the line by removing the initial `//` and then restart Shairport Sync (or reboot the device) for the changed setting to take effect. +### Sync is slightly off! +Please see [Adjusting Sync](./ADVANCED%20TOPICS/AdjustingSync.md). ### WiFi adapter running in power-saving / low-power mode