public class AudioEvent
extends java.lang.Object
Constructor and Description |
---|
AudioEvent(TarsosDSPAudioFormat format) |
Modifier and Type | Method and Description |
---|---|
static double |
calculateRMS(float[] floatBuffer)
Calculates and returns the root mean square of the signal.
|
void |
clearFloatBuffer() |
int |
getBufferSize() |
byte[] |
getByteBuffer()
Return a byte array with the audio data in bytes.
|
double |
getdBSPL()
Returns the dBSPL for a buffer.
|
double |
getEndTimeStamp() |
float[] |
getFloatBuffer() |
long |
getFrameLength() |
int |
getOverlap() |
double |
getProgress()
Calculate the progress in percentage of the total number of frames.
|
double |
getRMS()
Calculates and returns the root mean square of the signal.
|
float |
getSampleRate() |
long |
getSamplesProcessed() |
double |
getTimeStamp()
Calculates and returns the time stamp at the beginning of this audio event.
|
boolean |
isSilence(double silenceThreshold) |
void |
setBytesProcessed(long bytesProcessed) |
void |
setBytesProcessing(int bytesProcessing) |
void |
setFloatBuffer(float[] floatBuffer) |
void |
setOverlap(int newOverlap) |
public AudioEvent(TarsosDSPAudioFormat format)
public float getSampleRate()
public int getBufferSize()
public long getFrameLength()
public int getOverlap()
public void setOverlap(int newOverlap)
public void setBytesProcessed(long bytesProcessed)
public double getTimeStamp()
public double getEndTimeStamp()
public long getSamplesProcessed()
public double getProgress()
public byte[] getByteBuffer()
public void setFloatBuffer(float[] floatBuffer)
public float[] getFloatBuffer()
public double getRMS()
public double getdBSPL()
public static double calculateRMS(float[] floatBuffer)
floatBuffer
- The audio buffer to calculate the RMS for.public void clearFloatBuffer()
public boolean isSilence(double silenceThreshold)
public void setBytesProcessing(int bytesProcessing)