Playback bit rate is faster than recording bit rate in Audio Spatializer SDK
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.
Your answer
![](https://koobas.hobune.stream/wayback/20220612100255im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Native audio plugin xcode build problem "undefined symbols" 0 Answers
Audio Spatializer Plugin SDK: how can plugin get channel count of input audio source? 0 Answers
Read asset file during native audio plugin initialization 0 Answers
Native audio Plugin SDK channels question 1 Answer
FPS Audio Issue 1 Answer