Repository navigation
Audio check of the Rust audio path on master: bit-transparent PCM, and 19.9 ms through OBS #3266
vpacher
started this conversation in
Show and tell
Replies: 1 comment
|
i'm in favor of promoting this to a set of issues that are actionable |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Much of the libobs audio path between an input and the outputs now runs as Rust in the hybrid libobs (
rust/README.md):audio-io, the clock-drift loop, the source's audio input, placement, timing and render plan, the volume steps, the audio tick's render, min-ts, mix (#3227 made it add only into the active mixes) and discard, and the scene audio mix. After #3227 merged I checked that path on real hardware: is the audio still clean, and how long does it take through OBS?Setup
1. Is the audio clean?
A 675 s stimulus (a 600 s continuous 997 Hz sine, level steps from -40 to -1 dBFS, a 20 Hz to 20 kHz sweep, a click train, noise and silence) played into the Dante module while OBS recorded with 32-bit float PCM in MKV. The recording was compared with the stimulus sample by sample.
So the samples the outputs get are the samples that came in.
2. How long does audio take through OBS?
OBS adds 19.9 ms (956 samples at 48 kHz) between its ALSA input and its audio monitoring output. That is about one audio tick (1024 frames = 21.3 ms).
How it was measured: a test signal goes out of the Mac over Dante into the USB module, through OBS (ALSA input, the audio tick, audio monitoring to the module's playback side through PipeWire) and back over Dante to the Mac, played and recorded in one duplex stream on one clock. The same loop then runs with OBS replaced by
pw-loopback, so everything outside OBS is the same in both runs. The difference is OBS's delay.pw-loopbackitself buffers about one PipeWire quantum (256 samples), so OBS's absolute share is the 19.9 ms plus a few ms at most.In both runs the returned signal is a sample-exact copy of the test signal (correlation 1.0 over 135 s), and the delay is the same in the first and second half of the take: no drift, no dropped or inserted samples.
Limits
All reactions