public class AudioSessionConfig
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
allowBluetooth
Allow Bluetooth
|
private int |
allowBluetoothA2dp
Allow Bluetooth A2DP
|
private int |
allowMixWithOthers
Allow mix with others
|
private int |
chatMode
Chat mode
|
private int |
defaultToSpeaker
Default to speaker
|
private int |
inputNumberOfChannels
Input number of channels
|
private double |
ioBufferDuration
IO buffer duration
|
private int |
outputNumberOfChannels
Output number of channels
|
private int |
overrideSpeaker
Override speaker
|
private int |
playbackAndRecord
Playback and record mode
|
private double |
sampleRate
Sample rate
|
| Constructor and Description |
|---|
AudioSessionConfig()
Default constructor for AudioSessionConfig.
|
AudioSessionConfig(int playbackAndRecord,
int chatMode,
int defaultToSpeaker,
int overrideSpeaker,
int allowMixWithOthers,
int allowBluetooth,
int allowBluetoothA2dp,
double sampleRate,
double ioBufferDuration,
int inputNumberOfChannels,
int outputNumberOfChannels)
Constructs AudioSessionConfig with all parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAllowBluetooth()
Gets whether to allow Bluetooth.
|
int |
getAllowBluetoothA2dp()
Gets whether to allow Bluetooth A2DP.
|
int |
getAllowMixWithOthers()
Gets whether to allow mix with others.
|
int |
getChatMode()
Gets the chat mode.
|
int |
getDefaultToSpeaker()
Gets the default to speaker setting.
|
int |
getInputNumberOfChannels()
Gets the input number of channels.
|
double |
getIoBufferDuration()
Gets the IO buffer duration.
|
int |
getOutputNumberOfChannels()
Gets the output number of channels.
|
int |
getOverrideSpeaker()
Gets the override speaker setting.
|
int |
getPlaybackAndRecord()
Gets the playback and record mode.
|
double |
getSampleRate()
Gets the sample rate.
|
void |
setAllowBluetooth(int allowBluetooth)
Sets whether to allow Bluetooth.
|
void |
setAllowBluetoothA2dp(int allowBluetoothA2dp)
Sets whether to allow Bluetooth A2DP.
|
void |
setAllowMixWithOthers(int allowMixWithOthers)
Sets whether to allow mix with others.
|
void |
setChatMode(int chatMode)
Sets the chat mode.
|
void |
setDefaultToSpeaker(int defaultToSpeaker)
Sets the default to speaker setting.
|
void |
setInputNumberOfChannels(int inputNumberOfChannels)
Sets the input number of channels.
|
void |
setIoBufferDuration(double ioBufferDuration)
Sets the IO buffer duration.
|
void |
setOutputNumberOfChannels(int outputNumberOfChannels)
Sets the output number of channels.
|
void |
setOverrideSpeaker(int overrideSpeaker)
Sets the override speaker setting.
|
void |
setPlaybackAndRecord(int playbackAndRecord)
Sets the playback and record mode.
|
void |
setSampleRate(double sampleRate)
Sets the sample rate.
|
private int playbackAndRecord
private int chatMode
private int defaultToSpeaker
private int overrideSpeaker
private int allowMixWithOthers
private int allowBluetooth
private int allowBluetoothA2dp
private double sampleRate
private double ioBufferDuration
private int inputNumberOfChannels
private int outputNumberOfChannels
public AudioSessionConfig()
public AudioSessionConfig(int playbackAndRecord,
int chatMode,
int defaultToSpeaker,
int overrideSpeaker,
int allowMixWithOthers,
int allowBluetooth,
int allowBluetoothA2dp,
double sampleRate,
double ioBufferDuration,
int inputNumberOfChannels,
int outputNumberOfChannels)
playbackAndRecord - Playback and record modechatMode - Chat modedefaultToSpeaker - Default to speakeroverrideSpeaker - Override speakerallowMixWithOthers - Allow mix with othersallowBluetooth - Allow BluetoothallowBluetoothA2dp - Allow Bluetooth A2DPsampleRate - Sample rateioBufferDuration - IO buffer durationinputNumberOfChannels - Input number of channelsoutputNumberOfChannels - Output number of channelspublic int getPlaybackAndRecord()
public void setPlaybackAndRecord(int playbackAndRecord)
playbackAndRecord - Playback and record modepublic int getChatMode()
public void setChatMode(int chatMode)
chatMode - Chat modepublic int getDefaultToSpeaker()
public void setDefaultToSpeaker(int defaultToSpeaker)
defaultToSpeaker - Default to speaker settingpublic int getOverrideSpeaker()
public void setOverrideSpeaker(int overrideSpeaker)
overrideSpeaker - Override speaker settingpublic int getAllowMixWithOthers()
public void setAllowMixWithOthers(int allowMixWithOthers)
allowMixWithOthers - Allow mix with others settingpublic int getAllowBluetooth()
public void setAllowBluetooth(int allowBluetooth)
allowBluetooth - Allow Bluetooth settingpublic int getAllowBluetoothA2dp()
public void setAllowBluetoothA2dp(int allowBluetoothA2dp)
allowBluetoothA2dp - Allow Bluetooth A2DP settingpublic double getSampleRate()
public void setSampleRate(double sampleRate)
sampleRate - Sample ratepublic double getIoBufferDuration()
public void setIoBufferDuration(double ioBufferDuration)
ioBufferDuration - IO buffer durationpublic int getInputNumberOfChannels()
public void setInputNumberOfChannels(int inputNumberOfChannels)
inputNumberOfChannels - Input number of channelspublic int getOutputNumberOfChannels()
public void setOutputNumberOfChannels(int outputNumberOfChannels)
outputNumberOfChannels - Output number of channels