Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Questions about visualization streams (Read 406 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Questions about visualization streams

I have a question regarding visualization streams, especially with get_chunk_absolute(), since the sliding DFT only works if the audio data is fed into the algorithm properly (new data since last calculation)

Does get_chunk_absolute() have requested_length/2 offset ahead actual playback, or perhaps full samples offset ahead of it?

Re: Questions about visualization streams

Reply #1
Apologies if my question sounds stupid. By looking at the specified line of unrelated component (foo_r128meter), it seems like the offset from actual playback (time of the latest sample from visualization streams vs the actual playback time in samples) is proportional to the requested length (not half of it contrary to oscilloscope visualization) right?

Especially when comes to something like an analog-style spectrum analyzer (By analog-style, I meant it doesn't use FFT, and instead it uses banks of IIR filters) inside foobar2000 (which doesn't exist yet besides VST plugins, which is out-of-scope for this topic), and when either the buffer alignment is wrong or the size of current visualization chunk is different from time difference between current and previous calculations in samples, it produces garbage results (where the frequency spectrum starts to look like spectrum of audio with clicking/popping caused by buffer underruns) as said in the comment of my non-realtime spectrogram sketch code (apologies if my sketch is completely unrelated to fb2k at all) when using either SWIFT or standard Sb-sDFT. So you need to have both correct alignment and buffer size (equal to time difference between current and previous like I said) to only cover newest samples since previous calculations in order to correctly visualize sliding DFT algorithm.