Class DelegatedAudioTrack
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.track.BaseAudioTrack
-
- com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack
-
- All Implemented Interfaces:
AudioItem,AudioTrack,InternalAudioTrack,AudioFrameProvider
- Direct Known Subclasses:
BandcampAudioTrack,GetyarnAudioTrack,HttpAudioTrack,LocalAudioTrack,M3uStreamAudioTrack,MpegAdtsAudioTrack,NicoAudioTrack,SoundCloudAudioTrack,SoundCloudM3uAudioTrack,VimeoAudioTrack,YandexMusicAudioTrack,YoutubeAudioTrack
public abstract class DelegatedAudioTrack extends BaseAudioTrack
Audio track which delegates its processing to another track. The delegate does not have to be known when the track is created, but is passed when processDelegate() is called.
-
-
Field Summary
-
Fields inherited from class com.sedmelluq.discord.lavaplayer.track.BaseAudioTrack
accurateDuration, trackInfo
-
-
Constructor Summary
Constructors Constructor Description DelegatedAudioTrack(AudioTrackInfo trackInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetDuration()longgetPosition()protected voidprocessDelegate(InternalAudioTrack delegate, LocalAudioTrackExecutor localExecutor)voidsetPosition(long position)Seek to the specified position.-
Methods inherited from class com.sedmelluq.discord.lavaplayer.track.BaseAudioTrack
addMarker, assignExecutor, createLocalExecutor, getActiveExecutor, getIdentifier, getInfo, getSourceManager, getState, getUserData, getUserData, isSeekable, makeClone, makeShallowClone, provide, provide, provide, provide, removeMarker, setMarker, setUserData, stop
-
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.InternalAudioTrack
process
-
-
-
-
Constructor Detail
-
DelegatedAudioTrack
public DelegatedAudioTrack(AudioTrackInfo trackInfo)
- Parameters:
trackInfo- Track info
-
-
Method Detail
-
processDelegate
protected void processDelegate(InternalAudioTrack delegate, LocalAudioTrackExecutor localExecutor) throws java.lang.Exception
- Throws:
java.lang.Exception
-
setPosition
public void setPosition(long position)
Description copied from interface:AudioTrackSeek to the specified position.- Specified by:
setPositionin interfaceAudioTrack- Overrides:
setPositionin classBaseAudioTrack- Parameters:
position- New position of the track in milliseconds
-
getDuration
public long getDuration()
- Specified by:
getDurationin interfaceAudioTrack- Overrides:
getDurationin classBaseAudioTrack- Returns:
- Duration of the track in milliseconds
-
getPosition
public long getPosition()
- Specified by:
getPositionin interfaceAudioTrack- Overrides:
getPositionin classBaseAudioTrack- Returns:
- Get the current position of the track in milliseconds
-
-