Interface AudioFrame
-
- All Known Implementing Classes:
AbstractMutableAudioFrame,ImmutableAudioFrame,MutableAudioFrame,ReferenceMutableAudioFrame,TerminatorAudioFrame
public interface AudioFrameRepresents an audio frame.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]getData()voidgetData(byte[] buffer, int offset)Before calling this method, the caller should verify that the data fits in the buffer usinggetDataLength().intgetDataLength()AudioDataFormatgetFormat()longgetTimecode()intgetVolume()booleanisTerminator()
-
-
-
Method Detail
-
getTimecode
long getTimecode()
- Returns:
- Absolute timecode of the frame in milliseconds.
-
getVolume
int getVolume()
- Returns:
- Volume of the current frame.
-
getDataLength
int getDataLength()
- Returns:
- Length of the data of this frame.
-
getData
byte[] getData()
- Returns:
- Byte array with the frame data.
-
getData
void getData(byte[] buffer, int offset)Before calling this method, the caller should verify that the data fits in the buffer usinggetDataLength().- Parameters:
buffer- Buffer to write the frame data to.offset- Offset in the buffer to start writing at.
-
getFormat
AudioDataFormat getFormat()
- Returns:
- The data format of this buffer.
-
isTerminator
boolean isTerminator()
- Returns:
- Whether this frame is a terminator. This is an internal concept of the player and should never be
truein any frames received by the user.
-
-