diff --git a/RtcEngine.swift b/RtcEngine.swift index 1d40ca5ee..493036d7c 100644 --- a/RtcEngine.swift +++ b/RtcEngine.swift @@ -188,8 +188,10 @@ protocol RtcEngineAudioEffectInterface { } protocol RtcEngineVoiceChangerInterface { + @available(*, deprecated) func setLocalVoiceChanger(_ params: NSDictionary, _ callback: Callback) + @available(*, deprecated) func setLocalVoiceReverbPreset(_ params: NSDictionary, _ callback: Callback) func setLocalVoicePitch(_ params: NSDictionary, _ callback: Callback) @@ -197,6 +199,12 @@ protocol RtcEngineVoiceChangerInterface { func setLocalVoiceEqualization(_ params: NSDictionary, _ callback: Callback) func setLocalVoiceReverb(_ params: NSDictionary, _ callback: Callback) + + func setAudioEffectPreset(_ params: NSDictionary, _ callback: Callback) + + func setVoiceBeautifierPreset(_ params: NSDictionary, _ callback: Callback) + + func setAudioEffectParameters(_ params: NSDictionary, _ callback: Callback) } protocol RtcEngineVoicePositionInterface { @@ -282,8 +290,10 @@ protocol RtcEngineWatermarkInterface { } protocol RtcEngineEncryptionInterface { + @available(*, deprecated) func setEncryptionSecret(_ params: NSDictionary, _ callback: Callback) + @available(*, deprecated) func setEncryptionMode(_ params: NSDictionary, _ callback: Callback) func enableEncryption(_ params: NSDictionary, _ callback: Callback) @@ -693,6 +703,18 @@ class RtcEngineManager: NSObject, RtcEngineInterface { @objc func setLocalVoiceReverb(_ params: NSDictionary, _ callback: Callback) { callback.code(engine?.setLocalVoiceReverbOf(AgoraAudioReverbType(rawValue: params["reverbKey"] as! Int)!, withValue: params["value"] as! Int)) } + + @objc func setAudioEffectPreset(_ params: NSDictionary, _ callback: Callback) { + callback.code(engine?.setAudioEffectPreset(AgoraAudioEffectPreset(rawValue: params["preset"] as! Int)!)) + } + + @objc func setVoiceBeautifierPreset(_ params: NSDictionary, _ callback: Callback) { + callback.code(engine?.setVoiceBeautifierPreset(AgoraVoiceBeautifierPreset(rawValue: params["preset"] as! Int)!)) + } + + @objc func setAudioEffectParameters(_ params: NSDictionary, _ callback: Callback) { + callback.code(engine?.setAudioEffectParameters(AgoraAudioEffectPreset(rawValue: params["preset"] as! Int)!, param1: params["param1"] as! Int32, param2: params["param2"] as! Int32)) + } @objc func enableSoundPositionIndication(_ params: NSDictionary, _ callback: Callback) { callback.code(engine?.enableSoundPositionIndication(params["enabled"] as! Bool))