-
Notifications
You must be signed in to change notification settings - Fork 276
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
Disable cross-fading between tracks with different sample rates #3
Disable cross-fading between tracks with different sample rates #3
Conversation
Cross-fading between tracks with differing sample rates (eg 44.1kHz ripped from CD and 48kHz high quality downloads) appears to cause an alarming burst of white noise at full volume during the cross-fade period. This is the case for my Squeezebox Touch when using the analogue outputs, at least. This modification is an extension of the method used for 'smart' cross-fade and temporarily disables cross-fading when transitioning between tracks with different sample rates. I believe this might fix bug#1884 (http://bugs.slimdevices.com/show_bug.cgi?id=1884) -- a golden oldie that is more than seven years old.
Sorry to bump this, but I was wondering if there was going to be any interest in merging this, or if some other information was going to be required. I'd be happy for any other solution, but this seems a cheap and cheerful way of fixing it. I find this is still needed for me to avoid bursts of full-volume noise on SB Touch, so I have to merge it when updating my installation. I can probably knock up a test case if anyone needs to see that. |
Thanks for the reminder. I've merged your change in to 7.9. Please let me know if there is any issue. Thanks again! |
Yes, that's now working a treat from public/7.9. Many thanks for merging that in. |
Stuart - I think we run into a bug with your change: the transition from the second-to-last to the last track would always disable crossfading, as we call trackSampleRateMatch($master, +1) and there's no next track available. Most users obviously didn't notice, as it's probably one out of a dozen tracks which doesn't crossfade. But if you eg. set RandomPlay to only add one track at a time, it becomes obvious, as we're always at the bottom of the playlist. Could you imagine a good fix for this? |
It's been so long I can't remember the details, but with that I'll get onto it and should have something in a few days when I Stuart mherger notifications@github.com writes:
|
This is an updated fix for temporarily disabling crossfade (if enabled) between tracks that have different sample rates. As in the original PR for this, this appears necessary for (at least) the Squeezebox Touch which will produce an alarming blast of white noise in such a situation. As reported in PR#3 (LMS-Community#3), this fix didn't work correctly when near the end of a playlist, for example when Random Play is adding a track at a time. The bug was caused because as well has looking between the new track and previous track to compare for a compatible sample rate, it was actually looking back even earlier in the playlist for no reason. This was because I didn't understand the meaning of the offset at this point in the code.
I've just created a new PR for this with what I think is a better fix. It passes the case described (Random Play). See #65. Sorry it's taken a while -- outside distractions were to blame! |
Cross-fading between tracks with differing sample rates (eg 44.1kHz ripped from CD and 48kHz high quality downloads) appears to cause an alarming burst of white noise at full volume during the cross-fade period. This is the case for my Squeezebox Touch when using the analogue outputs, at least.
This modification is an extension of the method used for 'smart' cross-fade and temporarily disables cross-fading when transitioning between tracks with different sample rates.
I believe this might fix bug#1884 (http://bugs.slimdevices.com/show_bug.cgi?id=1884) -- a golden oldie that is more than seven years old.