Skip to content

Commit 0dbe52d

Browse files
committed
NEW: setVoiceConversionPreset for iOS
1 parent 6561832 commit 0dbe52d

6 files changed

Lines changed: 624 additions & 343 deletions

File tree

iOS/APIExample.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 51;
6+
objectVersion = 52;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -209,7 +209,6 @@
209209
033A9F62252D8B0A00BC26E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/VideoMetadata.storyboard; sourceTree = "<group>"; };
210210
033A9F65252D8B0E00BC26E1 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/VideoMetadata.strings"; sourceTree = "<group>"; };
211211
033A9F67252D8B2A00BC26E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/VoiceChanger.storyboard; sourceTree = "<group>"; };
212-
033A9F6A252D8B2F00BC26E1 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/VoiceChanger.strings"; sourceTree = "<group>"; };
213212
033A9F6C252D8B3500BC26E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MediaChannelRelay.storyboard; sourceTree = "<group>"; };
214213
033A9F6F252D8B3900BC26E1 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/MediaChannelRelay.strings"; sourceTree = "<group>"; };
215214
033A9F71252D8B3E00BC26E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/SuperResolution.storyboard; sourceTree = "<group>"; };
@@ -299,6 +298,7 @@
299298
5708D0B6259C905D00BE0C41 /* Agorafdkaac.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Agorafdkaac.framework; path = APIExample/Agorafdkaac.framework; sourceTree = "<group>"; };
300299
5708D0B7259C905D00BE0C41 /* AgoraRtcKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AgoraRtcKit.framework; path = APIExample/AgoraRtcKit.framework; sourceTree = "<group>"; };
301300
5708D0B8259C905D00BE0C41 /* AgoraAIDenoise.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AgoraAIDenoise.framework; path = APIExample/AgoraAIDenoise.framework; sourceTree = "<group>"; };
301+
576AC75225E4EB8000109189 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/VoiceChanger.strings"; sourceTree = "<group>"; };
302302
576BB8EF259B00E100323D43 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/CreateDataStream.storyboard; sourceTree = "<group>"; };
303303
576BB8F3259B00E300323D43 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/CreateDataStream.strings"; sourceTree = "<group>"; };
304304
576EA57925ADC4A1000B3D79 /* VideoChat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoChat.swift; sourceTree = "<group>"; };
@@ -1286,7 +1286,7 @@
12861286
isa = PBXVariantGroup;
12871287
children = (
12881288
033A9F67252D8B2A00BC26E1 /* Base */,
1289-
033A9F6A252D8B2F00BC26E1 /* zh-Hans */,
1289+
576AC75225E4EB8000109189 /* zh-Hans */,
12901290
);
12911291
name = VoiceChanger.storyboard;
12921292
sourceTree = "<group>";

iOS/APIExample/Common/AgoraExtension.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,25 @@ extension AgoraAudioReverbType {
263263
}
264264
}
265265

266+
extension AgoraVoiceConversionPreset {
267+
func description() -> String {
268+
switch self {
269+
case .conversionOff:
270+
return "Off".localized
271+
case .changerNeutral:
272+
return "Neutral".localized
273+
case .changerSweet:
274+
return "Sweet".localized
275+
case .changerSolid:
276+
return "Solid".localized
277+
case .changerBass:
278+
return "Bass".localized
279+
@unknown default:
280+
return "\(self.rawValue)"
281+
}
282+
}
283+
}
284+
266285
extension UIAlertController {
267286
func addCancelAction() {
268287
self.addAction(UIAlertAction(title: "Cancel".localized, style: .cancel, handler: nil))

0 commit comments

Comments
 (0)