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).
76 lines
1.6 KiB
C#
76 lines
1.6 KiB
C#
// Plain managed record types — what survives past the native struct/free-list lifetime
|
|
// (Marshaling.cs converts the native *Native structs into these and immediately frees the
|
|
// native list). Nothing here holds an IntPtr.
|
|
namespace VoiceCat.Interop;
|
|
|
|
public sealed record ChannelInfo(
|
|
uint Id,
|
|
uint ParentId,
|
|
string Name,
|
|
string Topic,
|
|
bool PasswordProtected,
|
|
uint MaxUsers);
|
|
|
|
public sealed record ChannelEditInfo(
|
|
uint Id,
|
|
uint ParentId,
|
|
string Name,
|
|
string Topic,
|
|
bool PasswordProtected,
|
|
string? Password,
|
|
uint MaxUsers,
|
|
uint SortOrder,
|
|
AudioConfigInfo Audio);
|
|
|
|
public sealed record UserInfo(
|
|
uint Id,
|
|
string Nickname,
|
|
bool IsGuest,
|
|
uint ChannelId,
|
|
bool SelfMicMuted,
|
|
bool SelfDeafened,
|
|
bool ServerMuted,
|
|
bool ServerDeafened);
|
|
|
|
public sealed record PermissionsInfo(
|
|
bool CanCreateTempChannel,
|
|
bool CanKick,
|
|
bool CanBan,
|
|
bool CanMoveUsers,
|
|
bool CanAdminAccounts,
|
|
bool IsAdmin);
|
|
|
|
public sealed record AccountInfo(
|
|
string Username,
|
|
bool IsAdmin,
|
|
ulong CreatedAtUnixMs,
|
|
ulong LastLoginUnixMs);
|
|
|
|
public sealed record StreamSummary(
|
|
uint StreamId,
|
|
VcStreamKind Kind,
|
|
string Label);
|
|
|
|
public sealed record RemoteStreamState(
|
|
float Gain,
|
|
bool Muted,
|
|
bool NoiseReduction);
|
|
|
|
public sealed record DeviceInfo(
|
|
string Id,
|
|
string Name,
|
|
bool IsDefault);
|
|
|
|
public sealed record AudioConfigInfo(
|
|
uint Codec,
|
|
bool Stereo,
|
|
uint SampleRate,
|
|
uint BitrateBps,
|
|
uint FrameMs,
|
|
uint Application,
|
|
bool Fec,
|
|
uint ExpectedPacketLoss,
|
|
bool Dtx,
|
|
uint Complexity,
|
|
bool Dred);
|