I'm developing a native audio plugin which send Windows desktop audio to Audio Mixer via Audio Spatializer SDK.
This plugin aims to create stereo (or 7.1ch future) virtual speaker sets in the VR space.
https://github.com/TyounanMOTI/LoopbackAudioSource
I've already tried AudioClip.PCMReaderCallback, but it has 1 second delay between playback and recording.
So, I'm trying Spatializer SDK, making my Spatializer plugin which send desktop audio to Oculus Spatializer plugin.
It's almost working but popping noise hears in about 1 minites.
The cause of noise is buffer depletion between recording and playback. This buffer stores recorded desktop audio, and ProcessCallback takes it to send to Oculus Spatializer plugin.
The cause of buffer depletion is the ProcessCallback requests higher bitrate (avg. 370kByte/sec) than recording bitrate (353kByte/sec). All processing is done by 44100Hz sampling rate of float, so both bitrate should about 352kByte/sec.
It seems that ProcessCallback's request bitrate is higher than 352kByte/sec, so it can be the cause of buffer depletion and popping noise.
Any improvement with my code? Is that known issue or correct behavior?
Thanks.
↧