Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


loud audio glitch between tracks and on stream stop
#1
Hi Team, Im getting a nasty full level audio glitch sometimes between tracks and when pausing a FLAC streaming radio. My configuration is rPi3b+1G with digi+pro hat. SPDIF direct into speakers. I use software volume control and SoX set to 96k/24bit very high quality.

Any thoughts where to look or how to proceed to eliminate factors and narrow down the cause?

My hunch is either the software volume or SoX doesnt like having the stream cut off suddenly, or sudden change in source sample rate, or both. Of course it should handle these events gracefully while outputting constant SPDIF stream. Maybe it should apply a short cross-fade to the output while it re-syncs to the new Fs.
Reply
#2
Sounds like DAC jitter which is usually an issue pertaining to poor DAC design or clock syncing when using optical/spdif connections. What DAC are you using?
Reply
#3
Its SPDIF/AES direct into a dBX Venu360. Surely the SPDIF stream coming out of Moode/SoX should be constant and not cause a professional "DAC" like this to output full level digital hash when "re-syncing" sources. Its one reason I choose to re-sample.
Reply
#4
In terms of eliminating the "DAC" as being the cause of the glitches, I feed the same dBX Venu360's other AES input from my MacBook Pro (USB via Topping D10 SPDIF output) and never hear glitches between tracks etc. Im assuming the MacOS coreaudio sample rate converter is "well behaved" in that it mutes or xfades while resyncing and never outputs an invalid or jittery bitstream.

I guess im just asking if we can make MoOde/SoX also be well-behaved in this regard.
Reply
#5
What do u mean by "the SPDIF stream coming out of Moode/SoX should be constant"?

One way to troubleshoot is to test the three cases below. If no glitches occur for case 1 and glitches do occur for cases 2 and 3 then what's happening is that MPD is closing the audio output for cases 2 and 3 but not for 1. I don't believe MPD has an option to always keep the audio output open.

1. Automatic transition from one track o the next in the Playlist
2. Manually clicking to a different track in the Playlist
3. Manually stopping a track or radio station
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
@mtnbrit
MacOS is not bit-perfect though. Like other desktop operating systems the audio stack resamples everything to whatever output rate is set in the sound settings regardless of the source.

MPD is outputting directly to ALSA on Moode which is sending data to the DAC at the same bit-depth/sample-rate as the source (if you're not enabling resampling in Moode's settings of course) and stops output when the source stops.
Thus one could argue that MPD/ALSA is the more "well behaved" platform as the source material is not being tampered with unfortunately this seems to be exposing these jitter issues with your speakers' DAC.
Do you get the same issues with resampling disabled?
Reply
#7
(03-26-2020, 09:44 PM)Tim Curtis Wrote: What do u mean by "the SPDIF stream coming out of Moode/SoX should be constant"?
I guess I mean the spdif bitstream being output from the digi+ should always be valid, no matter what the user is doing, ie skipping from track to track with different sample rates or bit depths, starting or stopping streams etc. This doesnt seem to be the case.
Reply
#8
(03-26-2020, 10:21 PM)vinnn Wrote: @mtnbrit
MacOS is not bit-perfect though. Like other desktop operating systems the audio stack resamples everything to whatever output rate is set in the sound settings regardless of the source.

MPD is outputting directly to ALSA on Moode which is sending data to the DAC at the same bit-depth/sample-rate as the source (if you're not enabling resampling in Moode's settings of course) and stops output when the source stops.
Thus one could argue that MPD/ALSA is the more "well behaved" platform as the source material is not being tampered with unfortunately this seems to be exposing these jitter issues with your speakers' DAC.  
Do you get the same issues with resampling disabled?

I just tested the Digi+ optical output into a DX3Pro DAC and the issue is 100% repeatable there too. So its nothing to do with my DAC.

Ill do some tests with resampling disabled now and post results.
Reply
#9
Same result with resample disabled.

Seems the issue is with software volume control. When I disable that, the issue goes away. 100% repeatable.

Resample disabled or enabled, software volume disabled. Perfect, no glitches.
Reply
#10
Thats an interesting result and might suggest a bug in MPD software volume routine. These kinds of should be reported to the MPD maintainer https://github.com/MusicPlayerDaemon/MPD/issues
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: