-
Notifications
You must be signed in to change notification settings - Fork 345
Audio Encoding Opus
Audio compression is also a critical part to reduce transferring size and improve streaming speed. Audio compression is even considered even harder than video compression because we are trying to formulize a smoothly continuous wave using concrete number.
Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. CloudRetro fetches audio sample from emulator audio and compresses it.
Opus is lossy audio encoding format. We convert audio to Opus format using libopus library. Opus has a strict requirement on time frame. The number of sample needs to fit 1ms, 2.5ms ... to be able to encode
The challenge of audio streaming is that any of discontinuity is noticeable. We need a reasonable buffer for audio so that it can be in sync with Game emulator smoothly.