2 ms·
Notes renice: https://stackdiary.com/linux-docs/renice/ https://stackdiary.com/linux-docs/renice/ audio server code: https://github.com/dosyago/BrowserBoxPro/
by keepamovin 3y ago
Notes
renice: https://stackdiary.com/linux-docs/renice/ https://stackdiary.com/linux-docs/renice/
audio server code: https://github.com/dosyago/BrowserBoxPro/blob/boss/src/services/instance/parec-server/index.js https://github.com/dosyago/BrowserBoxPro/blob/boss/src/servi...
audio client code: https://github.com/dosyago/BrowserBoxPro/blob/boss/src/public/voodoo/src/constructor.js#L547 https://github.com/dosyago/BrowserBoxPro/blob/boss/src/publi...
-------
FAQ
What real time prio did you renice to? We tried a few around -16 but settled on -15.
Did you try WebRTC for the audio? Yes, we tried the data channel for streaming the WAV chunks, but in this case WS was more reliable and faster (I guess it was because we were producing small chunks at a consistent rate). I'm interested in exploring WebRTC audio channel streaming if anyone knows, come and contribute: https://github.com/dosyago/BrowserBoxPro https://github.com/dosyago/BrowserBoxPro or get in touch at opensource@dosyago.com
Why are you using WAV not MP3 for audio? Because we're chunking it. I didn't know how you can slice MP3 into tiny pieces for custom ACK-based streaming like we are doing, and I'm not even sure if it's possible: when I tried the MP3 became corrupted, but WAV worked fine, (I guess because it's linear not a compressed self-referential format like MP3). In tests the reduction in bandwidth due to MP3, was somewhat lost to the increase in latency / compute on the server to encode it. If anyone knows a better way to stream audio (or MP3) in this case come contribute: https://github.com/dosyago/BrowserBoxPro https://github.com/dosyago/BrowserBoxPro or get in touch at opensource@dosyago.com