-
Notifications
You must be signed in to change notification settings - Fork 19
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
How to set Frame Size? #81
Comments
Change the And to be specific, in general the frame size is the size of one audio frame, and an audio frame is all the samples that happen at the same time (one per channel). The size of the frame is therefore the number of channel (if in samples) or
You can't set a very specific frame size in general (for all backends and hardware), because You can query the minimum latency supported and check the actual latency you have (roundtrip by summing or one way for input or output) using three other methods. |
Wow that was really educational, I did some Plugin Development but since I want to build audio apps in Rust instead of Juce I have to dig deeper into audio I/O. Right now I am still using the Juce audio callback that I wrapped in Rust, but it is way too heavy to build for what it is doing (not to mention the licensing). Yes it is the buffer size or number of frames what I was talking about. With the drawing I will never mix this up again :) |
Yes, or get an FFT implementation that can do non-power-of-two transforms. Off the top of my head, If this works for you then it's perfect, if it doesn't, ring buffer it is (or you can also do tricks if you in fact want to do a convolution, https://fgiesen.wordpress.com/2023/03/19/notes-on-ffts-for-users/ is a good read). |
Yes good read! |
Btw when I call stream.input_latency() (I call it right after starting the stream), it shows the Error Message |
On macOS you can only retrieve this after the stream has been running for some time, because (part of) the number comes from something the real-time audio callback passes as argument. But also it sounds like you might be using the C++ backend for macOS, you should be using the rust backend, it's probably something we should be offering as a feature or something. Maybe it's around here? https://github.com/mozilla/cubeb-rs/blob/master/cubeb-sys/build.rs |
In C cubeb you just clone the rust backend (https://github.com/mozilla/cubeb-coreaudio-rs/) in the |
it is defnitely running cmake and building cubeb_audiounit.cpp and cubeb_osx_run_loop.cpp. |
Yes, sorry about that, we're using another build system in Firefox so we're missed updating this one. |
I made it download the repo and use the cmake command, but then it complains because of a dependency problem.. I might do a PR for this buils.rs extension and we can continue fixing this there?
|
Sure, thanks! |
For the record: #82 |
I want to set a specific frame size of the audio callback. Is that possible in cubeb? Right now I always get 512 samples.
Thanks you for your support!
The text was updated successfully, but these errors were encountered: