Package com.amazonaws.ivs.broadcast
Class StageAudioConfiguration
java.lang.Object
com.amazonaws.ivs.broadcast.StageAudioConfiguration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
enableEchoCancellation
(boolean enable) Sets whether echo cancellation should be enabled.void
enableNoiseSuppression
(boolean enable) Setting this to true will enable noise suppression.int
boolean
boolean
boolean
isStereo()
void
setMaxBitrate
(int maxBitrate) Sets the maximum bitrate for the publishing audio stream.void
setStereo
(boolean stereo) This property indicates whether the encoder is asked to encode in stereo or not.
-
Constructor Details
-
StageAudioConfiguration
public StageAudioConfiguration()
-
-
Method Details
-
getMaxBitrate
public int getMaxBitrate()- Returns:
- The maximum bitrate for the publishing audio stream. By default this is 64k.
-
setMaxBitrate
public void setMaxBitrate(int maxBitrate) Sets the maximum bitrate for the publishing audio stream. This value must be between 12k and 128k. If the provided bitrate falls outside this range, the bitrate will not be set and anIllegalArgumentException
will be thrown.- Parameters:
maxBitrate
- the desired maximum bitrate- Throws:
IllegalArgumentException
- if bitrate is not valid
-
isStereo
public boolean isStereo()- Returns:
- Whether or not stereo audio is desired
-
setStereo
public void setStereo(boolean stereo) This property indicates whether the encoder is asked to encode in stereo or not. By default this is `false`. Depending on the bitrate or the subscriber's capabilities, not all subscribers may hear stereo audio. There are many reasons a subscribe might not be able to play stereo audio. 1. The hardware they are using for audio output doesn't support stereo. 2. Their decoder doesn't support decoding stereo audio. 3. The audio mode they are using doesn't support stereo output. On Android, not all presets provided by `StageAudioManager` can output stereo audio. For best playback quality, IVS recommends using the `studio` or `subscribeOnly` presets. Headsets with a dedicated left and right speaker also make the impact of stereo more pronounced. -
isNoiseSuppressionEnabled
public boolean isNoiseSuppressionEnabled()- Returns:
- Whether noise suppression is enabled.
-
enableNoiseSuppression
public void enableNoiseSuppression(boolean enable) Setting this to true will enable noise suppression. By default this is true.- Parameters:
enable
- whether to enable noise suppression
-
isEchoCancellationEnabled
public boolean isEchoCancellationEnabled()- Returns:
- whether echo cancellation is enabled.
-
enableEchoCancellation
public void enableEchoCancellation(boolean enable) Sets whether echo cancellation should be enabled. By default, echo cancellation is enabled.- Parameters:
enable
- whether to enable echo cancellation.
-