Skip to content

Commit

Permalink
feat: support 3.3.1 for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Mar 8, 2021
1 parent 551ebfe commit cd7a2cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Annotations.java
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ public class Annotations {
AgoraEncryptionMode.AES128ECB,
AgoraEncryptionMode.AES256XTS,
AgoraEncryptionMode.SM4128ECB,
AgoraEncryptionMode.AES128GCM,
AgoraEncryptionMode.AES256GCM,
})
@Retention(RetentionPolicy.SOURCE)
public @interface AgoraEncryptionMode {
Expand All @@ -408,6 +410,8 @@ public class Annotations {
int AES128ECB = 2;
int AES256XTS = 3;
int SM4128ECB = 4;
int AES128GCM = 5;
int AES256GCM = 6;
}

@IntDef({
Expand Down
3 changes: 2 additions & 1 deletion Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ fun RemoteAudioStats.toMap(): Map<String, Any?> {
"totalActiveTime" to totalActiveTime,
"publishDuration" to publishDuration,
"qoeQuality" to qoeQuality,
"qualityChangedReason" to qualityChangedReason
"qualityChangedReason" to qualityChangedReason,
"mosValue" to mosValue
)
}

Expand Down
6 changes: 6 additions & 0 deletions RtcEngine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ class IRtcEngine {

fun setVoiceBeautifierPreset(params: Map<String, *>, callback: Callback)

fun setVoiceConversionPreset(params: Map<String, *>, callback: Callback)

fun setAudioEffectParameters(params: Map<String, *>, callback: Callback)

fun setVoiceBeautifierParameters(params: Map<String, *>, callback: Callback)
Expand Down Expand Up @@ -742,6 +744,10 @@ class RtcEngineManager(
callback.code(engine?.setVoiceBeautifierPreset((params["preset"] as Number).toInt()))
}

override fun setVoiceConversionPreset(params: Map<String, *>, callback: Callback) {
callback.code(engine?.setVoiceConversionPreset((params["preset"] as Number).toInt()))
}

override fun setAudioEffectParameters(params: Map<String, *>, callback: Callback) {
callback.code(engine?.setAudioEffectParameters((params["preset"] as Number).toInt(), (params["param1"] as Number).toInt(), (params["param2"] as Number).toInt()))
}
Expand Down

0 comments on commit cd7a2cd

Please sign in to comment.