-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimizing audio pop with owntone + metadata pipe #389
Comments
(sorry for the late reply) I have added an |
Hi - I just tried this out and can confirm that removing: And adding: Changes it from an obvious 2 seconds of the previous track to a tiny/v. short crackle sound. my git diff:
|
As mentioned in owntone/owntone-server#295 (comment), the metadata pipe support makes owntone much more responsive. However, there's a distracting ~0.2s of audio pop at the start of every user-initiated track change. My guess of what's happening is this:
[end of last song----|----start of new song-------]
. owntone blindly plays this data (since it's just a dumb pipe) and we get the pop.I think this is fundamentally hard to solve because because the metadata change and the contents of the audio pipe are not in sync, and owntone has no idea when the next song is starting (it's just playing the contents of the pipe). However, I think silence/some additional delay would be preferable to the noise.
I couldn't find an event in the player code that corresponded to the new stream actually starting (onTrackChanged is fired immediately), so onMetadataAvailable seemed like the next best thing. Moving the
dacpPipe.sendPipeFlush();
call here minimized the sound to a brief click, which makes me feel like this hypothesis is on the right track. However, moving it here kinda sucks because it really ought to be a track change callback, and it affects non user-initiated track changes too.Wondering if you have some ideas. I think the ideal time to send the flush message would be right before the new track audio is about to be written to the pipe.
The text was updated successfully, but these errors were encountered: