Open goatchurchprime opened 2 weeks ago
I finally got a chance to take a look at this and the AudioStream integration and web/mobile platform support is definitely a nice upgrade!
The API and parameters aren't exactly what I'd expect and I don't love that it's an amalgamation of a few things that leads to a 6MB binary per architecture/platform. Any interest in breaking out the opus part of that into its own extension? If you don't plan on it, I might just do that and attribute the things I take from your code.
It would be great if Opus was in core - your implementations are probably the furthest along, so I'd be curious if you had opinions/plans in that regard.
If you check the commit history, there's a lot of debugging (and more to do). There are many more failure cases caused by packing and unpacking the audio on different systems than I imagined. So you can consider the current code as now being organized to track down these cases. It's also got all the features implemented available for evaluation as to whether they work for your application.
For example, the rnn noise filter probably isn't needed for VR applications since the mic is located perfectly just above your mouth on the headset, but you might find it's essential for a mic on a PC. It will be easy to make a version that has this compiled out with a stub header file that is otherwise API compatible, like I did with the OVRLipSync library to make it lighter when you are sure you don't need that feature.
Also the API is complex to try and save CPU cycles when you use VOX, volume as a trigger to start recording a message, because we keep the raw samples in a buffer and then only process them if it's necessary (with the undropchunk feature to receive preclipping).
Happy to have a chat over the this audio system (as part of testing) if you find me on the godot discord @juliantodd
https://github.com/goatchurchprime/two-voip-godot-4
Might want to look at this one, and say if there are any features you need that it's missing.