Class AbstractMutableAudioFrame
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.track.playback.AbstractMutableAudioFrame
-
- All Implemented Interfaces:
AudioFrame
- Direct Known Subclasses:
MutableAudioFrame,ReferenceMutableAudioFrame
public abstract class AbstractMutableAudioFrame extends java.lang.Object implements AudioFrame
Base class for mutable audio frames.
-
-
Constructor Summary
Constructors Constructor Description AbstractMutableAudioFrame()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableAudioFramefreeze()AudioDataFormatgetFormat()longgetTimecode()intgetVolume()booleanisTerminator()voidsetFormat(AudioDataFormat format)voidsetTerminator(boolean terminator)voidsetTimecode(long timecode)voidsetVolume(int volume)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sedmelluq.discord.lavaplayer.track.playback.AudioFrame
getData, getData, getDataLength
-
-
-
-
Method Detail
-
getTimecode
public long getTimecode()
- Specified by:
getTimecodein interfaceAudioFrame- Returns:
- Absolute timecode of the frame in milliseconds.
-
setTimecode
public void setTimecode(long timecode)
-
getVolume
public int getVolume()
- Specified by:
getVolumein interfaceAudioFrame- Returns:
- Volume of the current frame.
-
setVolume
public void setVolume(int volume)
-
getFormat
public AudioDataFormat getFormat()
- Specified by:
getFormatin interfaceAudioFrame- Returns:
- The data format of this buffer.
-
setFormat
public void setFormat(AudioDataFormat format)
-
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.
-
setTerminator
public void setTerminator(boolean terminator)
-
freeze
public ImmutableAudioFrame freeze()
- Returns:
- An immutable instance created from this mutable audio frame. In an ideal flow, this should never be called.
-
-