Constructor and Description |
---|
Builder(AudioMixingRule rule)
Construct an instance for the given
AudioMixingRule . |
Modifier and Type | Method and Description |
---|---|
AudioMix |
build()
Combines all of the settings and return a new
AudioMix object. |
AudioMix.Builder |
setDevice(AudioDeviceInfo device)
Sets the audio device used for playback.
|
AudioMix.Builder |
setFormat(AudioFormat format)
Sets the
AudioFormat for the mix. |
AudioMix.Builder |
setRouteFlags(int routeFlags)
Sets the routing behavior for the mix.
|
public Builder(AudioMixingRule rule) throws IllegalArgumentException
AudioMixingRule
.rule
- a non-null AudioMixingRule
instance.IllegalArgumentException
public AudioMix.Builder setFormat(AudioFormat format) throws IllegalArgumentException
AudioFormat
for the mix.format
- a non-null AudioFormat
instance.IllegalArgumentException
public AudioMix.Builder setRouteFlags(int routeFlags) throws IllegalArgumentException
AudioMix.ROUTE_FLAG_LOOP_BACK
.routeFlags
- one of AudioMix.ROUTE_FLAG_LOOP_BACK
,
AudioMix.ROUTE_FLAG_RENDER
IllegalArgumentException
public AudioMix.Builder setDevice(AudioDeviceInfo device) throws IllegalArgumentException
AudioMix.ROUTE_FLAG_RENDER
.device
- a non-null AudioDeviceInfo describing the audio device to play the output
of this mix.IllegalArgumentException
public AudioMix build() throws IllegalArgumentException
AudioMix
object.AudioMix
objectIllegalArgumentException
- if no AudioMixingRule
has been set.