public static class AudioStreamInfo.Builder extends Object
AudioStreamInfo objects.SystemCapability.Multimedia#AUDIO| 构造器 | 说明 |
|---|---|
Builder() |
Default constructor used to create a
Builder instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
AudioStreamInfo.Builder |
audioStreamFlag(AudioStreamInfo.AudioStreamFlag flag) |
Sets the audio stream flag.
|
AudioStreamInfo |
build() |
Creates an
AudioStreamInfo object containing all audio stream configuration that has been set. |
AudioStreamInfo.Builder |
channelMask(AudioStreamInfo.ChannelMask inputChannelMask) |
Sets the channel mask of the audio stream.
|
AudioStreamInfo.Builder |
contentType(AudioStreamInfo.ContentType contentType) |
Sets the content type of audio streams.
|
AudioStreamInfo.Builder |
encodingFormat(AudioStreamInfo.EncodingFormat inputEncodingFormat) |
Sets the encoding format of the audio stream.
|
AudioStreamInfo.Builder |
sampleRate(int inputSampleRate) |
Sets the sampling rate of the audio stream.
|
AudioStreamInfo.Builder |
streamUsage(AudioStreamInfo.StreamUsage inputStreamUsage) |
Sets the usage type of the audio stream.
|
public AudioStreamInfo.Builder encodingFormat(AudioStreamInfo.EncodingFormat inputEncodingFormat)
inputEncodingFormat - Indicates the encoding format to set, which is defined by EncodingFormat.Builder object.public AudioStreamInfo.Builder sampleRate(int inputSampleRate)
inputSampleRate - Indicates the sampling rate to set.Builder object.public AudioStreamInfo.Builder channelMask(AudioStreamInfo.ChannelMask inputChannelMask)
inputChannelMask - Indicates the channel mask to set, which is defined by ChannelMask.Builder object.public AudioStreamInfo.Builder streamUsage(AudioStreamInfo.StreamUsage inputStreamUsage)
inputStreamUsage - Indicates the usage type to set, which is defined in StreamUsage.Builder object.public AudioStreamInfo.Builder contentType(AudioStreamInfo.ContentType contentType)
contentType - Indicates the content type to set. Available values are as follows:
AudioStreamInfo.Builder instance.public AudioStreamInfo.Builder audioStreamFlag(AudioStreamInfo.AudioStreamFlag flag)
flag - Indicates the audio stream flag to set, which is defined in AudioStreamFlag.Builder object.public AudioStreamInfo build()
AudioStreamInfo object containing all audio stream configuration that has been set.AudioStreamInfo object.