Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why need to set frame size to multiple of 128? #55

Open
DBraun opened this issue Mar 2, 2022 · 3 comments
Open

Why need to set frame size to multiple of 128? #55

DBraun opened this issue Mar 2, 2022 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@DBraun
Copy link

DBraun commented Mar 2, 2022

For ambiBIN, is it necessary to require the frame size to be a multiple of 128?

https://github.com/leomccormack/Spatial_Audio_Framework/blob/e32c6ec8f1e87fa6360aa75725b3073d02fef1c4/examples/src/ambi_bin/ambi_bin.c#L408 and

if((nCurrentBlockSize % frameSize == 0)){ /* divisible by frame size */

2022-03-02 11_01_41-

I'm trying to use the plugin in a real-time environment, and I think it has a fluctuating non-standard block size. If the audio rate is 44100, and the video rate of the environment is 60, then the requested number of samples is 735, and this is not a multiple of 128.

@leomccormack
Copy link
Owner

Hi, apologies for the delayed response.
As the plugin is written now, the framesize of a multiple of 128 is strict.

Note that this isn't the case for all SPARTA plugins. E.g. the sparta_powermap will accept any block sizes by feeding/reading from FIFO buffers. However, this incurs some additional latency.
For e.g. sparta_ambiBIN, responsiveness was deemed to be more important than having the flexibility of the FIFO buffers. Here, the input 128 sample frames and processed right-away. Any excess samples are instead zeroed.

However, having both options would be ideal.... However, I've not managed to get around to this yet, so actually if anyone is willing to give this a go, then I can offer some guidance along the way : )

@leomccormack leomccormack added the help wanted Extra attention is needed label Apr 2, 2022
@DBraun
Copy link
Author

DBraun commented Apr 7, 2022

Thanks, just wanted to mention that implementing setNonRealtime() could help get the best of both worlds (FIFO when real-time mode and fixed block size when non-real-time).

@mdedwards
Copy link

Hello, I think I'm getting this error when using the Panner VST. I can't be sure as it only flashes up for a fraction of a second every so often. I don't see anywhere to set frame size. Best, Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants