feat(clients): expose all channel codec params + guest nickname everywhere
Channel create/edit UIs only surfaced a subset of the core's vc_audio_config, and DRED was exposed nowhere. While adding it, found a latent ABI mismatch: both Swift AudioConfig and the C# VcAudioConfigNative blittable struct were one int short of the native vc_audio_config (missing the trailing `dred`), so native read past the managed struct in vc_create_channel/vc_edit_channel. - core marshaling: thread `dred` through Swift (Models/Marshaling/toNative) and C# (Structs/Models/Marshaling/VoiceCatClient) -- fixes the ABI gap + enables it - windows: add the one missing DRED checkbox to ChannelEditDialog - macos: ChannelEditSheet now exposes application, sample rate, packet loss, complexity, and DRED (was stereo/bitrate/frame/FEC/DTX only) - ios: rebuild ChannelEditView into a full create+edit form (all params); add SessionState.editChannel + an admin Edit swipe action (iOS had no edit UI) - guest nickname: add a dedicated `nickname` to SavedServer on macOS+iOS (backward-compatible Codable), shown in Guest mode, wired into the guest auth path -- guests could not set a display name on either before (only Windows) Verified: macOS + iOS (sim, arm64) xcodebuild BUILD SUCCEEDED; core ctest 22/23 (only external_pcm aborts on a pre-existing shutdown mutex race; no C++ changed).
This commit is contained in:
@@ -94,7 +94,7 @@ internal enum Marshaling {
|
||||
AudioConfig(codec: c.codec, stereo: c.mode != 0, sampleRate: c.sample_rate,
|
||||
bitrateBps: c.bitrate_bps, frameMs: c.frame_ms, application: c.application,
|
||||
fec: c.fec != 0, expectedPacketLoss: c.expected_packet_loss,
|
||||
dtx: c.dtx != 0, complexity: c.complexity)
|
||||
dtx: c.dtx != 0, complexity: c.complexity, dred: c.dred != 0)
|
||||
}
|
||||
|
||||
static func permissions(_ p: vc_permissions) -> Permissions {
|
||||
|
||||
@@ -193,15 +193,16 @@ public struct AudioConfig: Sendable, Equatable {
|
||||
public let expectedPacketLoss: UInt32 // % 0..100
|
||||
public let dtx: Bool
|
||||
public let complexity: UInt32 // 0..10
|
||||
public let dred: Bool // Deep REDundancy (Opus 1.6), off by default
|
||||
|
||||
public init(codec: UInt32 = 0, stereo: Bool = false, sampleRate: UInt32 = 48000,
|
||||
bitrateBps: UInt32 = 64000, frameMs: UInt32 = 20, application: UInt32 = 0,
|
||||
fec: Bool = true, expectedPacketLoss: UInt32 = 5, dtx: Bool = false,
|
||||
complexity: UInt32 = 10) {
|
||||
complexity: UInt32 = 10, dred: Bool = false) {
|
||||
self.codec = codec; self.stereo = stereo; self.sampleRate = sampleRate
|
||||
self.bitrateBps = bitrateBps; self.frameMs = frameMs; self.application = application
|
||||
self.fec = fec; self.expectedPacketLoss = expectedPacketLoss; self.dtx = dtx
|
||||
self.complexity = complexity
|
||||
self.complexity = complexity; self.dred = dred
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -586,6 +586,7 @@ extension AudioConfig {
|
||||
n.expected_packet_loss = expectedPacketLoss
|
||||
n.dtx = dtx ? 1 : 0
|
||||
n.complexity = complexity
|
||||
n.dred = dred ? 1 : 0
|
||||
return n
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user