Package org.javacord.api.audio
Interface PauseableAudioSource
-
- All Superinterfaces:
AudioSource,AudioSourceAttachableListenerManager,Specializable<AudioSource>
- All Known Implementing Classes:
SilentAudioSource
public interface PauseableAudioSource extends AudioSource
A pauseable audio source.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanisPaused()Checks if the audio source is paused.default voidpause()Pauses the audio source.default voidresume()Resumes the audio source.voidsetPaused(boolean paused)Sets whether the audio source should be paused.-
Methods inherited from interface org.javacord.api.audio.AudioSource
addTransformer, asBufferableAudioSource, asDownloadableAudioSource, asPauseableAudioSource, asSeekableAudioSource, copy, getApi, getNextFrame, getTransformers, hasFinished, hasNextFrame, isMuted, mute, removeTransformer, removeTransformers, setMuted, unmute
-
Methods inherited from interface org.javacord.api.listener.audio.AudioSourceAttachableListenerManager
addAudioSourceAttachableListener, addAudioSourceFinishedListener, getAudioSourceAttachableListeners, getAudioSourceFinishedListeners, removeAudioSourceAttachableListener, removeListener
-
Methods inherited from interface org.javacord.api.util.Specializable
as
-
-
-
-
Method Detail
-
pause
default void pause()
Pauses the audio source.Equivalent to calling
setPaused(true).- See Also:
setPaused(boolean)
-
resume
default void resume()
Resumes the audio source.Equivalent to calling
setPaused(false).- See Also:
setPaused(boolean)
-
setPaused
void setPaused(boolean paused)
Sets whether the audio source should be paused.A paused audio source will completely stop. This means, that after unpausing the audio source will continue at the same "position".
- Parameters:
paused- Whether the audio source should be paused.
-
isPaused
boolean isPaused()
Checks if the audio source is paused.- Returns:
- Whether the audio source is paused or not.
-
-