mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-09-12 18:44:25 +08:00
feat: UAC USB microphone passthrough
- Add UAC1 gadget function (ConfigFS) with optimized endpoint config - Browser mic capture with Opus encoding via WebCodecs AudioEncoder - WebSocket audio transport (Opus 64kbps, 100x bandwidth reduction vs raw PCM) - aplay subprocess for reliable PCM playback to USB gadget - Settings toggle + ActionBar mic button (hidden when UAC disabled) - Dynamic PCM device resolution (/proc/asound) - c_chmask=0 + req_number=4 fixes DWC3 composite isochronous endpoint issue
This commit is contained in:
@@ -77,6 +77,8 @@ pub struct AppState {
|
||||
pub msd: Arc<RwLock<Option<MsdController>>>,
|
||||
pub atx: Arc<RwLock<Option<AtxController>>>,
|
||||
pub audio: Arc<AudioController>,
|
||||
pub uac_playback: Arc<RwLock<Option<crate::audio::uac_streamer::UacPlaybackWriter>>>,
|
||||
pub uac_config: Arc<RwLock<crate::otg::service::UacConfig>>,
|
||||
pub rustdesk: Arc<RwLock<Option<Arc<RustDeskService>>>>,
|
||||
pub vnc: Arc<RwLock<Option<Arc<VncService>>>>,
|
||||
pub rtsp: Arc<RwLock<Option<Arc<RtspService>>>>,
|
||||
@@ -146,6 +148,8 @@ impl AppState {
|
||||
revoked_sessions: Arc::new(RwLock::new(VecDeque::new())),
|
||||
config_apply_locks: ConfigApplyLocks::new(),
|
||||
data_dir,
|
||||
uac_playback: Arc::new(RwLock::new(None)),
|
||||
uac_config: Arc::new(RwLock::new(crate::otg::service::UacConfig::default())),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user