1
Audio / Re: Getting a sample buffer in sync with music's own.
« on: March 31, 2014, 11:46:34 pm »
In the previous thread I linked there was a delay between the samples being analysed (roughly 2 seconds for a 44.1kHz sound) and the ones actually being played through the speakers. You suggested lowering the buffer size in sf::Music although pointed out there would still be a delay, only smaller and that the music might not play smoothly.
I thought I could just use a simple queue to store the 3 buffers and use the "oldest" one for FFT analysis. When new samples were loaded I would push them into the queue and just pop the "oldest" one. It doesn't work and is still roughly 2 seconds infront.
I would've thought this would solve the delay caused by the triple buffering in sf::Music, but it doesn't and I can't figure out why....I probably dun goofed somewhere.
I thought I could just use a simple queue to store the 3 buffers and use the "oldest" one for FFT analysis. When new samples were loaded I would push them into the queue and just pop the "oldest" one. It doesn't work and is still roughly 2 seconds infront.
I would've thought this would solve the delay caused by the triple buffering in sf::Music, but it doesn't and I can't figure out why....I probably dun goofed somewhere.