mirror of https://github.com/jetkvm/kvm.git
ALSA now forces the configured sample rate (default 48kHz) instead of auto-detecting the source rate. This prevents Opus encoder initialization failures when HDMI sources output 44.1kHz audio, which Opus doesn't support. Changes: - Use snd_pcm_hw_params_set_rate() to force exact rate (48kHz by default) - ALSA performs software resampling if hardware rate differs - Update valid rates to Opus-compatible only (8k, 12k, 16k, 24k, 48k) - Remove auto-adaptation logic that caused Opus failures with 44.1kHz This ensures audio capture works reliably with any HDMI source rate. |
||
|---|---|---|
| .. | ||
| c | ||
| cgo_source.go | ||
| cgo_source_stub.go | ||
| relay.go | ||
| source.go | ||