Closed teoavv94 closed 1 year ago
Thanks for the post. There are quite a few things to tease out here.
First, the syslog above is not informative. To get debug log from Shairport Sync ("SPS"), set the log_verbosity
to 1
and set --statistics
to "yes"
in the configuration file and restart.
Second, a lot is happening to the audio when it leaves SPS. I imagine that the path is something like:
SPS → alsa `default` device → PulseAudio → (44.1k to 48k transcode) → Bluetooth Audio
Third, I guess that the buffer_size = 2048;
is probably not needed. Also, it might be worth (temporarily at least) setting the audio_backend_latency_offset_in_seconds
to 0
.
If you could run SPS through a track and a track-to-next-track transition and post the log, that would be useful.
Hi Mike thank you. I've made the log by changing the configuration file as you suggested (I've left only the negative delay of 125 ms, as in my previous tests the problem persisted even with 0 delay), you can read the output it in the attached text file.
Thanks -- that's interesting. It seems that at the start SPS was running twice. Really, only one copy should be running at a time. You can see that the second instance of it stopped after a while.
Anyway, a quick way to check if SPS is introducing distortion is to disable synchronisation. In the alsa
stanza of the configuration file:
disable_synchronization = "yes"; // Set to "yes" to disable synchronization. Default is "no"
Make the change and restart, and listen to hear if the distortion is still there. Also, please post the log, and let's see what's happening.
With a quick test seems to be almost resolved, some minor random delay still present during some song (no more at the beginning, even with a very quick track change!) but it is very less annoying, even my HomePod Mini have a similar behavior sometimes... So I consider it an airplay flaw. Anyway I paste the new log.
Thanks for the update. Another setting to try would be to increase the size of the buffer SPS tries to maintain in the output device from the default of 0.2 to, maybe, 0.5 seconds. The setting is in the general
stanza:
audio_backend_buffer_desired_length_in_seconds = 0.5;
Does that makes a difference?
Hi Mike, this issue has been resolved. I tested the audio for about 2 hours and didn't hear any distortion. But another issue occurred, I think is not directly related to SPS... As you can see at the end of the new log bluetooth disconnect automatically for saving energy even if SPS is playing something. I hope that you can help me even with this issue.
Thanks for the update!
I'm afraid I don't have any suggestions to offer on the Bluetooth issue; perhaps some other contributors might have some ideas.
This issue has been inactive for 45 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.
What happened?
Hi, I've an issue with my installation on Raspberry Pi 3 with a Bluetooth speaker as output, that I don't know how to resolve. The problem is that when the player (mainly Apple Music on iPhone 12 Pro Max, but it happens with every player and on every device) the audio is distorted when a new track starts. In my opinion it seems to be a buffer problem, so I've tried to increase the buffer size of alsa but the error persist. Thanks!
PS: as you can see from the log output I've this error but it seems not to be a problem:
For this reason I include the result of the command "ps aux | grep shairp":
Relevant log output - shairport-sync -v
Relevant log output - syslog
Configuration Information.
How did you install Shairport Sync?
A package manager (apt, apt install, yum, pkg, etc.)
Check previous issues