zao / foo_wave_seekbar

A foobar2000 UI seekbar element displaying the playing waveform.
http://www.foobar2000.org/components/view/foo_wave_seekbar
Other
87 stars 7 forks source link

Bugged, when used with skip silence dsp: Jumps position and gets out of sync. #41

Closed mzso closed 5 years ago

mzso commented 5 years ago

I've long noticed that the waveform seekbar playback position gets out of sync with the audio.

Now I found out that it happens because of bad interaction with the skip silence dsp, which I believe is an internal dsp. Her are some screencast examples: seekbar-sync1.zip

What's weird is it gets out of sync before the silent part. I guess when the silence is removed from the buffer? Or something like that.

zao commented 5 years ago

When generating the waveform, I query the expected length from the static or dynamic information of the track. When drawing it, I rely fully on the duration reported by foobar2000 and the reported playback position.

If you compare my position with the builtin seekbar, it should be roughly equivalent. I'm not sure if there's anything I can do here that would realign properly in the presence of any DSP that adds or removes track length.

I don't know quite how the builtin skipping DSP does what it does, but I can't do much more than assume that the track as it exists at the point of scanning is the track that's played at display time.

I can't really support those kinds of DSPs while analysing the track either, as it would require a full track decode with the DSPs active to determine the true length, and then re-decode it to do the analysis and somehow know what DSPs and what settings were active when generating it. This would be brittle and quite expensive, particularly as the main foobar2000 process is 32-bit.

That's not any work I'm overly interested in doing for this component that's pretty much in maintenance-only mode due to its age and dependencies.

zao commented 5 years ago

@mzso This should be solved with foobar2000 v1.5 beta. The playback position is accurately represented when skipping sections of silence now with the internal DSP enabled.

mzso commented 5 years ago

@zao commented on 2019. aug. 29. 22:03 CEST:

@mzso This should be solved with foobar2000 v1.5 beta. The playback position is accurately represented when skipping sections of silence now with the internal DSP enabled.

Seems so. Great.