Open sniperrifle2004 opened 4 years ago
Hey thanks for raising this @sniperrifle2004!
I'm not wholly convinced this is cpal's job to solve
I'm very much with you here, I think we're better off keeping CPAL's scope as minimal as possible (e.g. purely the necessities for cross-platform audio I/O) and allowing other crates to emerge and solve these things on top. E.g. there is already dsp-chain
, rodio
, (edit: and now dasp_graph
) and I'm sure many many other different audio routing crates to suit different needs that can extend cpal.
Due to the wide variety of
Device
s there is an equally wide range of capabilities. Specifically the device in question might not support mixing. Which means that there is no guaranteed possibility of doing multiple output streams.I'm not wholly convinced this is cpal's job to solve, but it could be addressed by introducing a
Mixer
device that wraps around a device and provides the necessary functionality. To keep it simple though I do suggest this device limit the possible output configurations to one (Specified initially) otherwise the complexity goes up quite a bit. That way you can reliably create multiple output streams targeted at any device.