public class AudioSample
extends java.lang.Object
| Constructor and Description |
|---|
AudioSample(int sampleRate,
int bitsPerSample,
int channels,
int source,
float timestamp,
byte[] audioData)
Constructs an audio sample
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
int |
getBitsPerSample()
Returns number of bits per sample.
|
int |
getChannels()
Returns number of channels.
|
int |
getDurationInMilliseconds()
Returns sample duration in milliseconds.
|
int |
getSampleRate()
Returns audio sample rate.
|
int |
getSource()
Returns source meta data.
|
float |
getTimestamp()
Returns number of seconds passed since session start.
|
byte[] |
toWavFile()
Joins all audio chunks into one playable RIFF wave file.
|
public AudioSample(int sampleRate,
int bitsPerSample,
int channels,
int source,
float timestamp,
byte[] audioData)
sampleRate - bitsPerSample - channels - source - timestamp - audioData - public int getSampleRate()
public int getBitsPerSample()
public int getChannels()
public int getSource()
public float getTimestamp()
public int getDurationInMilliseconds()
public void destroy()
public byte[] toWavFile()
throws java.io.IOException
java.io.IOException