Thanks for the info Pieter! I’m currently hacking on CPAL but I’ll let you know once my focus shifts onto the audio graph abstraction so that we can discuss some more!
I had a look at CPAL and it seems that it is similar in purpose to rsynth , with the difference that CPAL focuses on “general purpose” audio backends
To clarify a little, CPAL aims to provide access to input, output (and in the future, duplex) audio device streams in a portable, cross-platform manner and nothing more. The scope can be likened to that of PortAudio or RtAudio, but with the aim of being built in pure-Rust - at least down to the level of the platform’s native audio host API(s). The idea is to leave higher-level, opinionated abstractions like synthesis, sample playback, audio processing, to other libraries that are built either on top of CPAL or used alongside it.
W.r.t. unification of rsynth and cpal - I think it’s fine to keep the two projects separate as both seem to have quite different goals as you’ve mentioned. I haven’t looked too closely at the API exposed by rsynth, but one way in which rsynth may benefit could be to use cpal to provide the low-level support for cross-platform streams for the standalone audio application side of things. Note however that cpal does not yet support jack as a host, though recently added a
Host API that should now make it possible to do so.
Thanks again for sharing!