From 836f3b4c87f0c0a478c135a4a6ed0ed4279a446e Mon Sep 17 00:00:00 2001 From: HUI Date: Mon, 8 Mar 2021 18:08:33 +0800 Subject: [PATCH] feat: support 3.3.1 for iOS --- Extensions.swift | 3 ++- RtcEngine.swift | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Extensions.swift b/Extensions.swift index 8c66a06c5..33d2c7497 100644 --- a/Extensions.swift +++ b/Extensions.swift @@ -86,7 +86,8 @@ extension AgoraRtcRemoteAudioStats { "totalActiveTime": totalActiveTime, "publishDuration": publishDuration, "qoeQuality": qoeQuality, - "qualityChangedReason": qualityChangedReason + "qualityChangedReason": qualityChangedReason, + "mosValue": mosValue ] } } diff --git a/RtcEngine.swift b/RtcEngine.swift index f840ac41a..805d92748 100644 --- a/RtcEngine.swift +++ b/RtcEngine.swift @@ -220,6 +220,8 @@ protocol RtcEngineVoiceChangerInterface { func setAudioEffectPreset(_ params: NSDictionary, _ callback: Callback) func setVoiceBeautifierPreset(_ params: NSDictionary, _ callback: Callback) + + func setVoiceConversionPreset(_ params: NSDictionary, _ callback: Callback) func setAudioEffectParameters(_ params: NSDictionary, _ callback: Callback) @@ -754,6 +756,10 @@ class RtcEngineManager: NSObject, RtcEngineInterface { callback.code(engine?.setVoiceBeautifierPreset(AgoraVoiceBeautifierPreset(rawValue: params["preset"] as! Int)!)) } + @objc func setVoiceConversionPreset(_ params: NSDictionary, _ callback: Callback) { + callback.code(engine?.setVoiceConversionPreset(AgoraVoiceConversionPreset(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)) }