Class AudioPlayer
java.lang.Object
dev.prozilla.pine.core.component.Component
dev.prozilla.pine.core.component.audio.AudioPlayer
- All Implemented Interfaces:
AudioSourceContext
,Destructible
,Printable
,ApplicationContext
,ApplicationProvider
,ComponentsContext
,ComponentsProvider
,EntityContext
,EntityProvider
,SceneContext
,SceneProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
static final float
-
Constructor Summary
ConstructorsConstructorDescriptionAudioPlayer
(AudioSource source) AudioPlayer
(AudioSource source, float volume) AudioPlayer
(String sourcePath) -
Method Summary
Methods inherited from class dev.prozilla.pine.core.component.Component
destroy, equals, getApplication, getEntity, getName, getScene, hashCode, setActive, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.prozilla.pine.core.ApplicationProvider
getAudioDevice, getConfig, getInput, getLogger, getModManager, getRenderer, getTimer, getTracker, getWindow
Methods inherited from interface dev.prozilla.pine.common.asset.audio.AudioSourceContext
restart, stop, togglePause
Methods inherited from interface dev.prozilla.pine.core.component.ComponentsProvider
getComponent, getComponentInParent, getComponentInParent, getComponents, getComponentsInChildren
Methods inherited from interface dev.prozilla.pine.core.entity.EntityContext
isDescendantOf
Methods inherited from interface dev.prozilla.pine.core.entity.EntityProvider
getChildWithTag, getFirstChild, getLastChild, getParentWithTag, getTransform, isDescendantOf
Methods inherited from interface dev.prozilla.pine.core.scene.SceneProvider
getCameraData, getWorld
-
Field Details
-
source
-
autoplay
public boolean autoplay -
DEFAULT_VOLUME
public static final float DEFAULT_VOLUME- See Also:
-
-
Constructor Details
-
AudioPlayer
-
AudioPlayer
-
AudioPlayer
-
-
Method Details
-
rewind
public void rewind()- Specified by:
rewind
in interfaceAudioSourceContext
-
play
public void play()- Specified by:
play
in interfaceAudioSourceContext
-
pause
public void pause()- Specified by:
pause
in interfaceAudioSourceContext
-
isPlaying
public boolean isPlaying()- Specified by:
isPlaying
in interfaceAudioSourceContext
-
setVolume
public void setVolume(float volume) - Specified by:
setVolume
in interfaceAudioSourceContext
-
setPitch
public void setPitch(float pitch) - Specified by:
setPitch
in interfaceAudioSourceContext
-
setLoop
public void setLoop(boolean loop) - Specified by:
setLoop
in interfaceAudioSourceContext
-
toggleMute
public void toggleMute() -
mute
public void mute() -
unmute
public void unmute() -
isMuted
public boolean isMuted()
-