Class AudioSource
java.lang.Object
dev.prozilla.pine.common.asset.audio.AudioSource
- All Implemented Interfaces:
Asset,AudioSourceContext,Destructible,Initializable
public class AudioSource
extends Object
implements Initializable, Destructible, Asset, AudioSourceContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys this object.double[]getAverageMagnitudes(int intervalCount) double[]getPath()Returns the path to the file this asset was loaded from.voidinit()Initializes this object to prepare its usage.booleanbooleanvoidpause()voidplay()voidrewind()voidsetAttribute(int attribute, boolean value) voidsetAttribute(int attribute, float value) voidsetAttribute(int attribute, int value) voidsetCapture(boolean capture) voidsetLoop(boolean loop) voidsetPitch(float pitch) voidsetVolume(float volume) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.prozilla.pine.common.asset.audio.AudioSourceContext
restart, stop, togglePause
-
Constructor Details
-
AudioSource
-
-
Method Details
-
init
Description copied from interface:InitializableInitializes this object to prepare its usage.- Specified by:
initin interfaceInitializable- Throws:
IllegalStateException
-
destroy
public void destroy()Description copied from interface:DestructibleDestroys this object.- Specified by:
destroyin interfaceAsset- Specified by:
destroyin interfaceDestructible
-
getPath
Description copied from interface:AssetReturns the path to the file this asset was loaded from. -
setCapture
public void setCapture(boolean capture) -
isCaptured
public boolean isCaptured() -
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
- Specified by:
setVolumein interfaceAudioSourceContext- Throws:
IllegalStateException
-
setPitch
- Specified by:
setPitchin interfaceAudioSourceContext- Throws:
IllegalStateException
-
setLoop
- Specified by:
setLoopin interfaceAudioSourceContext- Throws:
IllegalStateException
-
setAttribute
- Throws:
IllegalStateException
-
setAttribute
- Throws:
IllegalStateException
-
setAttribute
- Throws:
IllegalStateException
-
getAverageMagnitudes
public double[] getAverageMagnitudes(int intervalCount) -
getMagnitudes
public double[] getMagnitudes()
-