public class AudioPcmFrame
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
bytesPerSample
Number of bytes per sample
|
private int |
captureTimestamp
Capture timestamp
|
private short |
data
Audio data
|
private int |
numChannels
Number of audio channels
|
private int |
sampleRateHz
Sample rate in Hz
|
private int |
samplesPerChannel
Number of samples per channel
|
| Constructor and Description |
|---|
AudioPcmFrame()
Default constructor for AudioPcmFrame.
|
AudioPcmFrame(int captureTimestamp,
int samplesPerChannel,
int sampleRateHz,
int numChannels,
int bytesPerSample,
short data)
Constructs an AudioPcmFrame with all parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBytesPerSample()
Gets the number of bytes per sample.
|
int |
getCaptureTimestamp()
Gets the capture timestamp.
|
short |
getData()
Gets the audio data.
|
int |
getNumChannels()
Gets the number of audio channels.
|
int |
getSampleRateHz()
Gets the sample rate in Hz.
|
int |
getSamplesPerChannel()
Gets the number of samples per channel.
|
void |
setBytesPerSample(int bytesPerSample)
Sets the number of bytes per sample.
|
void |
setCaptureTimestamp(int captureTimestamp)
Sets the capture timestamp.
|
void |
setData(short data)
Sets the audio data.
|
void |
setNumChannels(int numChannels)
Sets the number of audio channels.
|
void |
setSampleRateHz(int sampleRateHz)
Sets the sample rate in Hz.
|
void |
setSamplesPerChannel(int samplesPerChannel)
Sets the number of samples per channel.
|
private int captureTimestamp
private int samplesPerChannel
private int sampleRateHz
private int numChannels
private int bytesPerSample
private short data
public AudioPcmFrame()
public AudioPcmFrame(int captureTimestamp,
int samplesPerChannel,
int sampleRateHz,
int numChannels,
int bytesPerSample,
short data)
captureTimestamp - Capture timestampsamplesPerChannel - Number of samples per channelsampleRateHz - Sample rate in HznumChannels - Number of audio channelsbytesPerSample - Number of bytes per sampledata - Audio datapublic int getCaptureTimestamp()
public void setCaptureTimestamp(int captureTimestamp)
captureTimestamp - Capture timestamppublic int getSamplesPerChannel()
public void setSamplesPerChannel(int samplesPerChannel)
samplesPerChannel - Number of samples per channelpublic int getSampleRateHz()
public void setSampleRateHz(int sampleRateHz)
sampleRateHz - Sample rate in Hzpublic int getNumChannels()
public void setNumChannels(int numChannels)
numChannels - Number of audio channelspublic int getBytesPerSample()
public void setBytesPerSample(int bytesPerSample)
bytesPerSample - Number of bytes per samplepublic short getData()
public void setData(short data)
data - Audio data