Package com.twilio.video
Class AudioFormat
java.lang.Object
com.twilio.video.AudioFormat
AudioFormat describes 16-bit signed Linear Pulse Code Modulation (LPCM) audio. This class allows
developers to customize the audio format used for audio capturing or rendering.
Supported sample rate values are 8000, 16000, 24000, 32000, 44100 and 48000 Hz. Only mono(number of channels 1) and stereo(number of channels 2) are supported by the SDK
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of channels in the audio stream.int
Returns the sample rate of the audio stream.
-
Field Details
-
AUDIO_SAMPLE_RATE_8000
public static final int AUDIO_SAMPLE_RATE_8000- See Also:
-
AUDIO_SAMPLE_RATE_16000
public static final int AUDIO_SAMPLE_RATE_16000- See Also:
-
AUDIO_SAMPLE_RATE_24000
public static final int AUDIO_SAMPLE_RATE_24000- See Also:
-
AUDIO_SAMPLE_RATE_32000
public static final int AUDIO_SAMPLE_RATE_32000- See Also:
-
AUDIO_SAMPLE_RATE_44100
public static final int AUDIO_SAMPLE_RATE_44100- See Also:
-
AUDIO_SAMPLE_RATE_48000
public static final int AUDIO_SAMPLE_RATE_48000- See Also:
-
AUDIO_SAMPLE_MONO
public static int AUDIO_SAMPLE_MONO -
AUDIO_SAMPLE_STEREO
public static final int AUDIO_SAMPLE_STEREO- See Also:
-
-
Constructor Details
-
AudioFormat
public AudioFormat(int sampleRate, int channelCount)
-
-
Method Details
-
getSampleRate
public int getSampleRate()Returns the sample rate of the audio stream. Valid values for this property are 8000, 16000, 24000, 32000, 44100 and 48000 Hz.- Returns:
- sampleRate
-
getChannelCount
public int getChannelCount()Returns the number of channels in the audio stream.- Returns:
- channelCount
-