Skip to content

FFT buffer size independent from audio service buffer size#128

Open
stijnvanbeek wants to merge 1 commit intomainfrom
fft-buffersize
Open

FFT buffer size independent from audio service buffer size#128
stijnvanbeek wants to merge 1 commit intomainfrom
fft-buffersize

Conversation

@stijnvanbeek
Copy link
Copy Markdown
Contributor

@stijnvanbeek stijnvanbeek commented Apr 4, 2026

In this PR I make the FFT buffersize a property instead of using the audio buffer size. To accomplish this the FFTBuffer internally uses a circular buffer to stock up on incoming audio samples.
This guarantees that the number of FFT bins and resolution remains the same regardless of the audio device settings.
Also in rare occasions the host supplies different buffer sizes of audio to portaudio which caused the previous implementation to hit an assert.

@stijnvanbeek stijnvanbeek requested a review from lshoek April 4, 2026 18:59
@lshoek
Copy link
Copy Markdown
Contributor

lshoek commented Apr 9, 2026

Thanks @stijnvanbeek! I'll take a look at it this weekend

@cklosters
Copy link
Copy Markdown
Member

cklosters commented Apr 10, 2026

Will merge when @lshoek approves and builds pass validation tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants