Skip to content

Commit c96aaa9

Browse files
Add a flag for hifi audio enabled (#961)
1 parent 291fa41 commit c96aaa9

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

Sources/StreamVideo/OpenApi/generated/Models/AudioSettings.swift

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public final class AudioSettings: @unchecked Sendable, Codable, JSONEncodable, H
1414
public init(from decoder: Decoder) throws {
1515
let container = try decoder.singleValueContainer()
1616
if let decodedValue = try? container.decode(String.self),
17-
let value = Self(rawValue: decodedValue) {
17+
let value = Self(rawValue: decodedValue) {
1818
self = value
1919
} else {
2020
self = .unknown
@@ -24,6 +24,7 @@ public final class AudioSettings: @unchecked Sendable, Codable, JSONEncodable, H
2424

2525
public var accessRequestEnabled: Bool
2626
public var defaultDevice: DefaultDevice
27+
public var hifiAudioEnabled: Bool?
2728
public var micDefaultOn: Bool
2829
public var noiseCancellation: NoiseCancellationSettingsRequest?
2930
public var opusDtxEnabled: Bool
@@ -33,6 +34,7 @@ public final class AudioSettings: @unchecked Sendable, Codable, JSONEncodable, H
3334
public init(
3435
accessRequestEnabled: Bool,
3536
defaultDevice: DefaultDevice,
37+
hifiAudioEnabled: Bool? = nil,
3638
micDefaultOn: Bool,
3739
noiseCancellation: NoiseCancellationSettingsRequest? = nil,
3840
opusDtxEnabled: Bool,
@@ -41,16 +43,18 @@ public final class AudioSettings: @unchecked Sendable, Codable, JSONEncodable, H
4143
) {
4244
self.accessRequestEnabled = accessRequestEnabled
4345
self.defaultDevice = defaultDevice
46+
self.hifiAudioEnabled = hifiAudioEnabled
4447
self.micDefaultOn = micDefaultOn
4548
self.noiseCancellation = noiseCancellation
4649
self.opusDtxEnabled = opusDtxEnabled
4750
self.redundantCodingEnabled = redundantCodingEnabled
4851
self.speakerDefaultOn = speakerDefaultOn
4952
}
50-
53+
5154
public enum CodingKeys: String, CodingKey, CaseIterable {
5255
case accessRequestEnabled = "access_request_enabled"
5356
case defaultDevice = "default_device"
57+
case hifiAudioEnabled = "hifi_audio_enabled"
5458
case micDefaultOn = "mic_default_on"
5559
case noiseCancellation = "noise_cancellation"
5660
case opusDtxEnabled = "opus_dtx_enabled"
@@ -60,17 +64,19 @@ public final class AudioSettings: @unchecked Sendable, Codable, JSONEncodable, H
6064

6165
public static func == (lhs: AudioSettings, rhs: AudioSettings) -> Bool {
6266
lhs.accessRequestEnabled == rhs.accessRequestEnabled &&
63-
lhs.defaultDevice == rhs.defaultDevice &&
64-
lhs.micDefaultOn == rhs.micDefaultOn &&
65-
lhs.noiseCancellation == rhs.noiseCancellation &&
66-
lhs.opusDtxEnabled == rhs.opusDtxEnabled &&
67-
lhs.redundantCodingEnabled == rhs.redundantCodingEnabled &&
68-
lhs.speakerDefaultOn == rhs.speakerDefaultOn
67+
lhs.defaultDevice == rhs.defaultDevice &&
68+
lhs.hifiAudioEnabled == rhs.hifiAudioEnabled &&
69+
lhs.micDefaultOn == rhs.micDefaultOn &&
70+
lhs.noiseCancellation == rhs.noiseCancellation &&
71+
lhs.opusDtxEnabled == rhs.opusDtxEnabled &&
72+
lhs.redundantCodingEnabled == rhs.redundantCodingEnabled &&
73+
lhs.speakerDefaultOn == rhs.speakerDefaultOn
6974
}
7075

7176
public func hash(into hasher: inout Hasher) {
7277
hasher.combine(accessRequestEnabled)
7378
hasher.combine(defaultDevice)
79+
hasher.combine(hifiAudioEnabled)
7480
hasher.combine(micDefaultOn)
7581
hasher.combine(noiseCancellation)
7682
hasher.combine(opusDtxEnabled)

Sources/StreamVideo/OpenApi/generated/Models/AudioSettingsRequest.swift

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ public final class AudioSettingsRequest: @unchecked Sendable, Codable, JSONEncod
1414
public init(from decoder: Decoder) throws {
1515
let container = try decoder.singleValueContainer()
1616
if let decodedValue = try? container.decode(String.self),
17-
let value = Self(rawValue: decodedValue) {
17+
let value = Self(rawValue: decodedValue) {
1818
self = value
1919
} else {
2020
self = .unknown
2121
}
2222
}
2323
}
24-
2524
public var accessRequestEnabled: Bool?
2625
public var defaultDevice: DefaultDevice
26+
public var hifiAudioEnabled: Bool?
2727
public var micDefaultOn: Bool?
2828
public var noiseCancellation: NoiseCancellationSettingsRequest?
2929
public var opusDtxEnabled: Bool?
@@ -33,6 +33,7 @@ public final class AudioSettingsRequest: @unchecked Sendable, Codable, JSONEncod
3333
public init(
3434
accessRequestEnabled: Bool? = nil,
3535
defaultDevice: DefaultDevice,
36+
hifiAudioEnabled: Bool? = nil,
3637
micDefaultOn: Bool? = nil,
3738
noiseCancellation: NoiseCancellationSettingsRequest? = nil,
3839
opusDtxEnabled: Bool? = nil,
@@ -41,36 +42,40 @@ public final class AudioSettingsRequest: @unchecked Sendable, Codable, JSONEncod
4142
) {
4243
self.accessRequestEnabled = accessRequestEnabled
4344
self.defaultDevice = defaultDevice
45+
self.hifiAudioEnabled = hifiAudioEnabled
4446
self.micDefaultOn = micDefaultOn
4547
self.noiseCancellation = noiseCancellation
4648
self.opusDtxEnabled = opusDtxEnabled
4749
self.redundantCodingEnabled = redundantCodingEnabled
4850
self.speakerDefaultOn = speakerDefaultOn
4951
}
50-
52+
5153
public enum CodingKeys: String, CodingKey, CaseIterable {
5254
case accessRequestEnabled = "access_request_enabled"
5355
case defaultDevice = "default_device"
56+
case hifiAudioEnabled = "hifi_audio_enabled"
5457
case micDefaultOn = "mic_default_on"
5558
case noiseCancellation = "noise_cancellation"
5659
case opusDtxEnabled = "opus_dtx_enabled"
5760
case redundantCodingEnabled = "redundant_coding_enabled"
5861
case speakerDefaultOn = "speaker_default_on"
5962
}
60-
63+
6164
public static func == (lhs: AudioSettingsRequest, rhs: AudioSettingsRequest) -> Bool {
6265
lhs.accessRequestEnabled == rhs.accessRequestEnabled &&
63-
lhs.defaultDevice == rhs.defaultDevice &&
64-
lhs.micDefaultOn == rhs.micDefaultOn &&
65-
lhs.noiseCancellation == rhs.noiseCancellation &&
66-
lhs.opusDtxEnabled == rhs.opusDtxEnabled &&
67-
lhs.redundantCodingEnabled == rhs.redundantCodingEnabled &&
68-
lhs.speakerDefaultOn == rhs.speakerDefaultOn
66+
lhs.defaultDevice == rhs.defaultDevice &&
67+
lhs.hifiAudioEnabled == rhs.hifiAudioEnabled &&
68+
lhs.micDefaultOn == rhs.micDefaultOn &&
69+
lhs.noiseCancellation == rhs.noiseCancellation &&
70+
lhs.opusDtxEnabled == rhs.opusDtxEnabled &&
71+
lhs.redundantCodingEnabled == rhs.redundantCodingEnabled &&
72+
lhs.speakerDefaultOn == rhs.speakerDefaultOn
6973
}
7074

7175
public func hash(into hasher: inout Hasher) {
7276
hasher.combine(accessRequestEnabled)
7377
hasher.combine(defaultDevice)
78+
hasher.combine(hifiAudioEnabled)
7479
hasher.combine(micDefaultOn)
7580
hasher.combine(noiseCancellation)
7681
hasher.combine(opusDtxEnabled)

0 commit comments

Comments
 (0)