Skip to content

Commit

Permalink
feat: upgrade to 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Dec 2, 2020
1 parent 4e4427b commit 78d9e0e
Show file tree
Hide file tree
Showing 7 changed files with 251 additions and 3 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${safeExtGet('kotlin_version', '1.3.72')}"
implementation "org.jetbrains.kotlin:kotlin-reflect:${safeExtGet('kotlin_version', '1.3.72')}"
implementation "io.agora.rtc:full-sdk:3.1.3"
implementation "io.agora.rtc:full-sdk:3.2.0"
}
2 changes: 1 addition & 1 deletion ios/agora_rtc_engine.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pod::Spec.new do |s|
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'AgoraRtcEngine_iOS_Crypto', '3.1.2'
s.dependency 'AgoraRtcEngine_iOS', '3.2.0'
s.platform = :ios, '8.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
Expand Down
25 changes: 25 additions & 0 deletions lib/src/enum_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -762,3 +762,28 @@ class AudioSessionOperationRestrictionConverter
return super.toValue(_$AudioSessionOperationRestrictionEnumMap);
}
}

@JsonSerializable()
class AudioEffectPresetConverter extends EnumConverter<AudioEffectPreset, int> {
AudioEffectPresetConverter(AudioEffectPreset e) : super(e);

AudioEffectPresetConverter.fromValue(int value)
: super.fromValue(_$AudioEffectPresetEnumMap, value);

int value() {
return super.toValue(_$AudioEffectPresetEnumMap);
}
}

@JsonSerializable()
class VoiceBeautifierPresetConverter
extends EnumConverter<VoiceBeautifierPreset, int> {
VoiceBeautifierPresetConverter(VoiceBeautifierPreset e) : super(e);

VoiceBeautifierPresetConverter.fromValue(int value)
: super.fromValue(_$VoiceBeautifierPresetEnumMap, value);

int value() {
return super.toValue(_$VoiceBeautifierPresetEnumMap);
}
}
68 changes: 68 additions & 0 deletions lib/src/enum_converter.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

119 changes: 119 additions & 0 deletions lib/src/enums.dart
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,14 @@ enum AudioScenario {
/// Gaming scenario.
@JsonValue(5)
ChatRoomGaming,

/// TODO
@JsonValue(6)
IOT,

/// TODO
@JsonValue(8)
MEETING,
}

/// The preset audio voice configuration used to change the voice effect.
Expand Down Expand Up @@ -1905,6 +1913,18 @@ enum WarningCode {
/// Audio processing module: A residual echo is detected, which may be caused by the belated scheduling of system threads or the signal overflow.
@JsonValue(1053)
ApmResidualEcho,

/// Super-resolution warning: the original video dimensions of the remote user exceed 640*480.
@JsonValue(1610)
SuperResolutionStreamOverLimitation,

/// Super-resolution warning: another user is using super resolution.
@JsonValue(1611)
SuperResolutionUserCountOverLimitation,

/// Super-resolution warning: The device is not supported.
@JsonValue(1612)
SuperResolutionDeviceNotSupported,
}

/// The audio channel of the sound.
Expand Down Expand Up @@ -2036,3 +2056,102 @@ enum AudioSessionOperationRestriction {
@JsonValue(1 << 7)
All,
}

/// TODO
enum AudioEffectPreset {
@JsonValue(0x00000000)
AudioEffectOff,

@JsonValue(0x02010100)
RoomAcousticsKTV,

@JsonValue(0x02010200)
RoomAcousticsVocalConcert,

@JsonValue(0x02010300)
RoomAcousticsStudio,

@JsonValue(0x02010400)
RoomAcousticsPhonograph,

@JsonValue(0x02010500)
RoomAcousticsVirtualStereo,

@JsonValue(0x02010600)
RoomAcousticsSpacial,

@JsonValue(0x02010700)
RoomAcousticsEthereal,

@JsonValue(0x02010800)
RoomAcoustics3DVoice,

@JsonValue(0x02020100)
VoiceChangerEffectUncle,

@JsonValue(0x02020200)
VoiceChangerEffectOldMan,

@JsonValue(0x02020300)
VoiceChangerEffectBoy,

@JsonValue(0x02020400)
VoiceChangerEffectSister,

@JsonValue(0x02020500)
VoiceChangerEffectGirl,

@JsonValue(0x02020600)
VoiceChangerEffectPigKing,

@JsonValue(0x02020700)
VoiceChangerEffectHulk,

@JsonValue(0x02030100)
StyleTransformationRnB,

@JsonValue(0x02030200)
StyleTransformationPopular,

@JsonValue(0x02040100)
PitchCorrection,
}

/// TODO
enum VoiceBeautifierPreset {
@JsonValue(0x00000000)
VoiceBeautifierOff,

@JsonValue(0x01010100)
ChatBeautifierMagnetic,

@JsonValue(0x01010200)
ChatBeautifierFresh,

@JsonValue(0x01010300)
ChatBeautifierVitality,

@JsonValue(0x01030100)
TimbreTransformationVigorous,

@JsonValue(0x01030200)
TimbreTransformationDeep,

@JsonValue(0x01030300)
TimbreTransformationMellow,

@JsonValue(0x01030400)
TimbreTransformationFalsetto,

@JsonValue(0x01030500)
TimbreTransformationFull,

@JsonValue(0x01030600)
TimbreTransformationClear,

@JsonValue(0x01030700)
TimbreTransformationResounding,

@JsonValue(0x01030800)
TimbreTransformationRinging,
}
36 changes: 36 additions & 0 deletions lib/src/rtc_engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ class RtcEngine with RtcEngineInterface {
}

@override
@deprecated
Future<void> setLocalVoiceChanger(AudioVoiceChanger voiceChanger) {
return _invokeMethod('setLocalVoiceChanger',
{'voiceChanger': AudioVoiceChangerConverter(voiceChanger).value()});
Expand Down Expand Up @@ -695,6 +696,7 @@ class RtcEngine with RtcEngineInterface {
}

@override
@deprecated
Future<void> setLocalVoiceReverbPreset(AudioReverbPreset preset) {
return _invokeMethod('setLocalVoiceReverbPreset',
{'preset': AudioReverbPresetConverter(preset).value()});
Expand Down Expand Up @@ -868,6 +870,28 @@ class RtcEngine with RtcEngineInterface {
Future<int> getNativeHandle() {
return _invokeMethod('getNativeHandle');
}

@override
Future<void> setAudioEffectParameters(
AudioEffectPreset preset, int param1, int param2) {
return _invokeMethod('setAudioEffectParameters', {
'preset': AudioEffectPresetConverter(preset).value(),
'param1': param1,
'param2': param2
});
}

@override
Future<void> setAudioEffectPreset(AudioEffectPreset preset) {
return _invokeMethod('setAudioEffectPreset',
{'preset': AudioEffectPresetConverter(preset).value()});
}

@override
Future<void> setVoiceBeautifierPreset(VoiceBeautifierPreset preset) {
return _invokeMethod('setVoiceBeautifierPreset',
{'preset': VoiceBeautifierPresetConverter(preset).value()});
}
}

/// @nodoc
Expand Down Expand Up @@ -1704,6 +1728,7 @@ mixin RtcVoiceChangerInterface {
/// - Do not use this method together with [RtcEngine.setLocalVoiceReverbPreset], or the method called earlier does not take effect.
///
/// **Parameter** [voiceChanger] The local voice changer option. See [AudioVoiceChanger].
@deprecated
Future<void> setLocalVoiceChanger(AudioVoiceChanger voiceChanger);

/// Sets the preset local voice reverberation effect
Expand All @@ -1713,6 +1738,7 @@ mixin RtcVoiceChangerInterface {
/// - Do not use this method together with [RtcEngine.setLocalVoiceChanger], or the method called eariler does not take effect.
///
/// **Parameter** [preset] The local voice reverberation preset. See See [AudioReverbPreset].
@deprecated
Future<void> setLocalVoiceReverbPreset(AudioReverbPreset preset);

/// Changes the voice pitch of the local speaker.
Expand All @@ -1738,6 +1764,16 @@ mixin RtcVoiceChangerInterface {
///
/// **Parameter** [value] Sets the local voice reverberation value.
Future<void> setLocalVoiceReverb(AudioReverbType reverbKey, int value);

/// TODO
Future<void> setAudioEffectPreset(AudioEffectPreset preset);

/// TODO
Future<void> setVoiceBeautifierPreset(VoiceBeautifierPreset preset);

/// TODO
Future<void> setAudioEffectParameters(
AudioEffectPreset preset, int param1, int param2);
}

/// @nodoc
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: agora_rtc_engine
description: Flutter plugin for Agora Video SDK.
version: 3.1.4
version: 3.2.0
homepage: https://www.agora.io
repository: https://github.com/AgoraIO/Flutter-SDK

Expand Down

0 comments on commit 78d9e0e

Please sign in to comment.