Enum Class StageAudioManager.UseCasePreset

java.lang.Object
java.lang.Enum<StageAudioManager.UseCasePreset>
com.amazonaws.ivs.broadcast.StageAudioManager.UseCasePreset
All Implemented Interfaces:
Serializable, Comparable<StageAudioManager.UseCasePreset>, Constable
Enclosing class:
StageAudioManager

public static enum StageAudioManager.UseCasePreset extends Enum<StageAudioManager.UseCasePreset>
Predefined audio configuration presets for common use cases.

Each preset configures the Android audio attributes (Source, ContentType, and Usage) along with echo cancellation and noise suppression settings optimized for specific scenarios. The preset will also automatically manage AudioManager.Mode as appropriate, including for Bluetooth, unless StageAudioManager.setAudioModeManagementEnabled(boolean) is set to false.

See documentation for Android's AudioAttributes and AudioRecord configuration, as well as Android AudioEffect and AudioManager.Mode.

In many cases, the only configuration needed in StageAudioManager is setting the UseCasePreset for the desired use case with this API, which will configure all underlying settings as needed.

  • STUDIO - Optimized for high-quality audio recording and playback. Uses VOICE_PERFORMANCE source for minimal processing, MUSIC content type, and MEDIA usage. Disables echo cancellation and noise suppression. STUDIO assumes the user is equipped with external devices (e.g., headset) or environment that provides echo cancellation and noise suppression.
  • SUBSCRIBE_ONLY - Optimized for playback-only scenarios where the user is not publishing audio. Uses GENERIC source, MUSIC content type, and MEDIA usage. Disables echo cancellation and noise suppression since no microphone input is being processed. Use this when only subscribing to other participants' streams.
  • VIDEO_CHAT - Optimized for real-time voice communication. Uses VOICE_COMMUNICATION source which enables Android's voice processing pipeline, SPEECH content type, and VOICE_COMMUNICATION usage. Enables both echo cancellation and noise suppression for clear voice transmission. This is the default preset and recommended for interactive scenarios.
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static StageAudioManager.UseCasePreset[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static StageAudioManager.UseCasePreset valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null