Open nikp123 opened 1 year ago
Tagging @ChunMinChang for initial review if he has some cycles. Thanks for the contribution, I'll run CI now.
I am on PTO right now. I can take a look next Monday.
Forced-pushed the "cargo fmt"-ed version as I was not aware of the tool. I would like a CI re-run.
I've done some changed to add error checking, however handling of selecting what sinks you want to use is still not implemented (because of the complexities involved).
Apologies if any of the mistakes in advance seem trivial.
While not an officially advertised feature in the PulseAudio API, all PulseAudio "sink"-s have a "monitor mode" where in any of the audio output devices there's a "loopback" input device which replicates all audio for said output. This allows us to effectively achieve recording any audio output as input within cubeb.
This commit is a continuation of said Draft shown in https://github.com/mozilla/cubeb/pull/691 but this time written in Rust. (yes it took me half a year but we're here)
ps: rust is hardAs I'm quite inexperienced when it comes to Rust (especially so when it's demanding code like FFI) comments on the code or any improvements that may be done are greatly appreciated.
Thanks.