being a fairly seasoned C++ audio developer (it’s what I do for a living, basically), I’ve recently been getting into Rust audio development.
Now, in the C++ world, there’s some things you should keep in mind, which are well summarized in this rather famous article: http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing
Basically, don’t do anything non-deterministic in the audio thread … no memory allocations, etc.
So I wonder how those things translate to Rust, and how I can write a balance between elegance and efficiency in Rust audio.
In my first Rust audio program (https://github.com/the-drunk-coder/wasm-loop-player), for example, I used fixed-sized arrays in a somewhat functional style. I wonder if it was more efficient to use a more old-fashioned C-Style and pass in the audio buffer to fill ? Those are the little questions I currently have …
I wonder what your thoughts on this are ?