Class TerminatorAudioFrame
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.track.playback.TerminatorAudioFrame
-
- All Implemented Interfaces:
AudioFrame
public class TerminatorAudioFrame extends java.lang.Object implements AudioFrame
Audio frame whereisTerminator()istrue.
-
-
Field Summary
Fields Modifier and Type Field Description static TerminatorAudioFrameINSTANCE
-
Constructor Summary
Constructors Constructor Description TerminatorAudioFrame()
-
Method Summary
All Methods Instance Methods Concrete 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 usingAudioFrame.getDataLength().intgetDataLength()AudioDataFormatgetFormat()longgetTimecode()intgetVolume()booleanisTerminator()
-
-
-
Field Detail
-
INSTANCE
public static final TerminatorAudioFrame INSTANCE
-
-
Method Detail
-
getTimecode
public long getTimecode()
- Specified by:
getTimecodein interfaceAudioFrame- Returns:
- Absolute timecode of the frame in milliseconds.
-
getVolume
public int getVolume()
- Specified by:
getVolumein interfaceAudioFrame- Returns:
- Volume of the current frame.
-
getDataLength
public int getDataLength()
- Specified by:
getDataLengthin interfaceAudioFrame- Returns:
- Length of the data of this frame.
-
getData
public byte[] getData()
- Specified by:
getDatain interfaceAudioFrame- Returns:
- Byte array with the frame data.
-
getData
public void getData(byte[] buffer, int offset)Description copied from interface:AudioFrameBefore calling this method, the caller should verify that the data fits in the buffer usingAudioFrame.getDataLength().- Specified by:
getDatain interfaceAudioFrame- Parameters:
buffer- Buffer to write the frame data to.offset- Offset in the buffer to start writing at.
-
getFormat
public AudioDataFormat getFormat()
- Specified by:
getFormatin interfaceAudioFrame- Returns:
- The data format of this buffer.
-
isTerminator
public boolean isTerminator()
- Specified by:
isTerminatorin interfaceAudioFrame- 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.
-
-