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 TypeFieldDescriptionbooleanstatic 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.prozilla.pine.core.ApplicationProvider
getAudioDevice, getConfig, getInput, getLogger, getModManager, getRenderer, getTimer, getTracker, getWindowMethods inherited from interface dev.prozilla.pine.common.asset.audio.AudioSourceContext
restart, stop, togglePauseMethods inherited from interface dev.prozilla.pine.core.component.ComponentsProvider
getComponent, getComponentInParent, getComponentInParent, getComponents, getComponentsInChildrenMethods inherited from interface dev.prozilla.pine.core.entity.EntityContext
isDescendantOfMethods inherited from interface dev.prozilla.pine.core.entity.EntityProvider
getChildWithTag, getFirstChild, getLastChild, getParentWithTag, getTransform, isDescendantOfMethods 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:
rewindin interfaceAudioSourceContext
-
play
public void play()- Specified by:
playin interfaceAudioSourceContext
-
pause
public void pause()- Specified by:
pausein interfaceAudioSourceContext
-
isPlaying
public boolean isPlaying()- Specified by:
isPlayingin interfaceAudioSourceContext
-
setVolume
public void setVolume(float volume) - Specified by:
setVolumein interfaceAudioSourceContext
-
setPitch
public void setPitch(float pitch) - Specified by:
setPitchin interfaceAudioSourceContext
-
setLoop
public void setLoop(boolean loop) - Specified by:
setLoopin interfaceAudioSourceContext
-
toggleMute
public void toggleMute() -
mute
public void mute() -
unmute
public void unmute() -
isMuted
public boolean isMuted()
-