Class SongSource
java.lang.Object
de.pottgames.tuningfork.SoundSource
de.pottgames.tuningfork.jukebox.song.SongSource
- Direct Known Subclasses:
BufferedSoundSource, StreamedSoundSource
Identifies objects to be used as a source of a
Song.-
Field Summary
Fields inherited from class SoundSource
sourceId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract floatReturns the duration in seconds.abstract floatReturns the playback position in seconds.Methods inherited from class SoundSource
attachEffect, attachEffect, detachAllEffects, detachEffect, disableAttenuation, dispose, enableAttenuation, getAttenuationFactor, getAttenuationMaxDistance, getAttenuationMinDistance, getPitch, getPosition, getRadius, getResampler, getSpatialization, getVirtualization, getVolume, hasFilter, isDirectional, isPaused, isPlaying, isRelative, makeDirectional, makeOmniDirectional, pause, play, setAttenuationFactor, setAttenuationMaxDistance, setAttenuationMinDistance, setDirection, setFilter, setLooping, setPitch, setPosition, setPosition, setRadius, setRelative, setResampler, setResamplerByIndex, setSpatialization, setSpeed, setSpeed, setVirtualization, setVolume, stop
-
Constructor Details
-
SongSource
protected SongSource()
-
-
Method Details
-
getDuration
public abstract float getDuration()Returns the duration in seconds. Might return -1 if the duration is not available.- Returns:
- the duration in seconds
-
getPlaybackPosition
public abstract float getPlaybackPosition()Returns the playback position in seconds.- Returns:
- the playback position in seconds
-