Skip to content

FFT buffer size independent from audio service buffer size#128

Open
stijnvanbeek wants to merge 1 commit into
mainfrom
fft-buffersize
Open

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

Conversation

@stijnvanbeek

@stijnvanbeek stijnvanbeek commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

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

lshoek commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

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

@cklosters

cklosters commented Apr 10, 2026

Copy link
Copy Markdown
Member

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

@stijnvanbeek

Copy link
Copy Markdown
Contributor Author

The build checks seem to be hanging?

@cklosters

Copy link
Copy Markdown
Member

Running

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