AudioEffectStore

abstract class AudioEffectStore

Audio effect setting related interfaces, managing voice changer, reverb, and ear monitor features for anchors.

Overview

AudioEffectStore Audio effect management class for handling anchor audio effect related business. AudioEffectStore provides a complete set of audio effect management APIs, including voice changer effects, reverb effects, and ear monitor functionality. Through this class, anchors can adjust their voice effects in real-time during live streaming to enhance the experience.

Key Features

  • Voice Changer Effects:Supports multiple voice changer effects such as child, little girl, uncle, etc.

  • Reverb Effects:Supports multiple reverb effects such as KTV, small room, auditorium, etc.

  • Ear Monitor:Anchors can hear their own voice in earphones, suitable for singing scenarios

  • Volume Control:Supports fine-grained ear monitor volume adjustment

Important: Use the shared singleton to get the AudioEffectStore instance. The set effects will automatically become invalid after leaving the room, and need to be set again for the next room entry.

Note: Audio effect state updates are delivered through the state publisher. Subscribe to it to receive real-time updates about voice changer, reverb, and ear monitor states.

Usage Example

// Get singleton instance
val store = AudioEffectStore.shared()

// Subscribe to state changes
lifecycleScope.launch {
store.audioEffectState.audioChangerType.collect { type ->
println("Current voice changer: $type")
}
}

lifecycleScope.launch {
store.audioEffectState.audioReverbType.collect { type ->
println("Current reverb: $type")
}
}

// Set voice changer effect
store.setAudioChangerType(AudioChangerType.LITTLE_GIRL)

// Set reverb effect
store.setAudioReverbType(AudioReverbType.KTV)

// Enable ear monitor
store.setVoiceEarMonitorEnable(true)
store.setVoiceEarMonitorVolume(80)

Warning: Due to the very high hardware latency of Bluetooth earphones, the ear monitor feature cannot be enabled when the anchor is wearing Bluetooth earphones. Please prompt the anchor to wear wired earphones in the user interface.

Topics

Getting Instance

Observing State

Voice Changer Settings

Reverb Settings

Ear Monitor Settings

Reset

  • reset - Reset to default state

See Also

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Singleton object

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun reset()

Reset to default state

Link copied to clipboard

Set voice changer effect

Link copied to clipboard

Set reverb effect

Link copied to clipboard
abstract fun setVoiceEarMonitorEnable(enable: Boolean)

Enable/disable ear monitor

Link copied to clipboard
abstract fun setVoiceEarMonitorVolume(volume: Int)

Set ear monitor volume