HQPlayer & Roon : Delay / Out of Sync

Hi

I am a happy user of roon with hqplayer. One thing I noticed is that since I use hqplayer with convolution and upsampling with GPU, there is a delay of 5-6 seconds before sounds come out, even though roon indicated it started.

This means the auto lyrics is out of sync and worse when the music finishes in roon and goes to the next song, the 5-6sec delayed sound is interrupted before it really finished.

Any chance to fix this? I presume there needs to be a general API to specify a delay between roon and whichever processing product (hqplayer or others).

Thanks!

What filters are you using in HQ Player ? The poly-sync filters have a preparatory delay as they set up for play.

I am using poly-sinc-ext2… on my system it takes about 5-6 sec to prepare. Any way to inform roon that only 5-6sec later before sounds comes out? Thanks

I’m not getting a significant delay with ext2, so it sounds like it could be system dependant. Can you describe your system ?

I don’t know of any way for Roon to know where HQ Player is up to. SFAIK when using HQ Player as an Output in Roon all of the play function is handled by HQ Player. Let’s flag @jussi_laako and @brian and see if there is something in the Roon/HQ Player interface that can deal with this.

Can you expand on this part of your post:

the 5-6sec delayed sound is interrupted before it really finished.

Are you saying that the end of a track is being chopped off by the beginning of another ? Do you have any Crossfade time set in Zone Settings/ Zone Options ?

That shouldn’t happen when all the tracks are same source format because in that case there’s an endless stream from Roon to HQPlayer. But if for example source sampling rate changes, Roon stops HQPlayer, adds new stream and starts playback again with that one.

If the convolution filter is really 5 - 6 seconds long, it may become a bit problematic due to large delay. Lengths below one second shouldn’t cause issues.

I have no Crossfade set (zero) in Zone Settings/Zone Options.

To expand on what I mean…

  • Roon has a ‘vertical cursor’ to indicate where one is in a song.
  • Sound comes out of my speakers only after the cursor has moved 5sec or so.
  • When Roon cursor indicates a song is finished and moved to the next track, music still comes out of my speakers because of the 5sec delay, and it seems it is chopped off when the cursor for the next track starts.

Anyway, I am going to reply to Jussi below who may have hit on something…

Thanks!

Hi Jussi

Thanks for the reply. I did a quick check. A few more pieces of info.

  • When I switch convolution off, the delay is <1sec.

  • My convolution filter is 65536 long at sampling rate of 88.2kHz. Some log info for playing 96k music to indicate this:

    2019/10/13 20:58:32 Rate: 96000, block size: 7680, frame size: 1280
    2019/10/13 20:58:32 Block size: 7680 (sample: 3)
    2019/10/13 20:58:32 Oversampling: extended poly 2
    2019/10/13 20:58:32 Modulator: adaptive seventh order 1-bit
    2019/10/13 20:58:32 Integrator: CIC
    2019/10/13 20:58:33 Playback engine ratio: 256
    2019/10/13 20:58:33 Set volume: -3
    2019/10/13 20:58:33 Convolution engine: overlap-save
    2019/10/13 20:58:33 Convolution gain compensation: 0
    2019/10/13 20:58:33 Longest IR: 65536
    2019/10/13 20:58:33 Impulse response read from file /var/hqplayer/home/filter_0.wav for channel 0 = -150.117 dB
    2019/10/13 20:58:33 Impulse response read from file /var/hqplayer/home/filter_1.wav for channel 1 = -162.03 dB
    2019/10/13 20:58:33 Impulse response resampled with ratio: 1.08844
    2019/10/13 20:58:33 Impulse response resampled with ratio: 1.08844
    2019/10/13 20:58:33 HF expansion for channel 0
    2019/10/13 20:58:33 HF expansion for channel 1
    2019/10/13 20:58:33 Convolution filter of length 131072 initialized for channel 0 = -0.072618 dB (-0.348994 - 0.211047)
    2019/10/13 20:58:33 Convolution filter of length 131072 initialized for channel 1 = -0.0511641 dB (-0.393114 - 0.234013)
    2019/10/13 20:58:33 Convolution engine ready and enabled
    2019/10/13 20:58:33 Offload: resampler=enabled convolution=enabled

It seems the convolution filter is causing the 5sec delay. Not sure why though. Any insights?

Thanks!

96k source rate and 128k-tap convolution filter means about 1.5 second delay. So you should be ~2.5 seconds delay total. There is also some amount of dependency on type and settings of the output.

(delay caused by ext2 filter is irrelevant here)

Thanks Jussi on the explanation.

If we get back to the original question… if there is a significant delay between Roon and HQPlayer (or any other processing products) for legitimate reasons, would it make sense for Roon to have an interface where this delay can be specified and accounted for in Roon? This means the vertical cursor in Roon is accurate, auto-lyrics is correct, music ends nicely, … etc…

I hope the question is clear. Maybe someone from Roon can shed light on this feature request?

Thanks!