com.aliyun.svideosdk.editor

## Interface AliyunIAudioController

-     public interface AliyunIAudioController

  sdk version >= v3.25.0

  Audio controller

  you can set audio properties with this controller. such as volume, denoise, fade in fade out...

  you must call #apply `apply()` to take effect.

  Attentions：

  you must call #apply `apply()` to take effect.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `apply()`
    `AliyunIAudioController` | `denoise(int denoiseWeight)` Denoises an audio stream.
    `int` | `getVolume()` get the volume
    `AliyunIAudioController` | `removeAudioFadeIn()` remove audio fade in
    `AliyunIAudioController` | `removeAudioFadeOut()` remove audio fade out
    `AliyunIAudioController` | `setAudioEffect(AudioEffectType type, float weight)` Adds a sound effect.
    `AliyunIAudioController` | `setAudioFadeIn(ShapeType shapeType, long durationInMillis)` set audio fade in
    `AliyunIAudioController` | `setAudioFadeOut(ShapeType shapeType, long durationInMillis)` set audio fade out
    `AliyunIAudioController` | `setVolume(int vol)` set the volume

- - ### Method Detail

    - #### setVolume

          AliyunIAudioController setVolume(int vol)

      set the volume
      Parameters:
        `vol` - 0:close 100:max
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### getVolume

          int getVolume()

      get the volume
      Returns:

    - #### denoise

          AliyunIAudioController denoise(int denoiseWeight)

      Denoises an audio stream.
      Parameters:
        `denoiseWeight` - 0:close 100:max
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### setAudioEffect

          AliyunIAudioController setAudioEffect(AudioEffectType type,
                                                float weight)

      Adds a sound effect. If there is no audio track in the target media file, the invocation has no effect.
      Parameters:
        `type` - The effect type `com.aliyun.svideosdk.editor.AudioEffectType`.
        `weight` - The weight of the effect. Valid values: [0,100].
      Returns:
        The id of the sound effect if the invocation is successful or an error code if the invocation fails.

    - #### setAudioFadeIn

          AliyunIAudioController setAudioFadeIn(ShapeType shapeType,
                                                long durationInMillis)

      set audio fade in
      Parameters:
        `shapeType` - the type of fade `ShapeType`
        `durationInMillis` - duration of fade. millisecond
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### setAudioFadeOut

          AliyunIAudioController setAudioFadeOut(ShapeType shapeType,
                                                 long durationInMillis)

      set audio fade out
      Parameters:
        `shapeType` - the type of fade `ShapeType`
        `durationInMillis` - duration of fade. millisecond
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### removeAudioFadeIn

          AliyunIAudioController removeAudioFadeIn()

      remove audio fade in
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### removeAudioFadeOut

          AliyunIAudioController removeAudioFadeOut()

      remove audio fade out
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### apply

          int apply()