setElectronicEffects method

Future<void> setElectronicEffects(
  1. bool enable,
  2. ZegoElectronicEffectsMode mode,
  3. int tonal
)

Turn on or off the electronic sound effect.

Available since: 2.13.0 Description: Call this function to turn on or off the electronic sound effect. Use cases: Often used in live broadcasting, voice chatroom and sung unaccompanied scenes. Default value: When this function is not called, the electronic sound effect is not enabled by default. When to call: It needs to be called after createEngine. Restrictions: None. Caution: When the mode parameter is Harmonic Minor, the tonal parameter does not take effect. Related APIs: Common electronic sound effect configurations can be set via setVoiceChangerPreset.

  • enable true to turn on the electronic sound effect, false to turn off the electronic sound effect.
  • mode Mode of Electronic Effects reference.
  • tonal The starting pitch of an electric tone in a given mode, representing 12 semitones in one octave of the sound, in the range 0, 11.

Implementation

Future<void> setElectronicEffects(
    bool enable, ZegoElectronicEffectsMode mode, int tonal) async {
  return await ZegoExpressImpl.instance
      .setElectronicEffects(enable, mode, tonal);
}