java.lang.Object
dev.aurumbyte.sypherengine.core.audio.Audio
The Audio Engine
- Since:
- v0.3.0
- Author:
- AurumByte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closing the audioclip and deallocating it from memorybooleanReturning whether the audioclip is playing or notvoidloop()Playing the audioclip on loopvoidplay()Playing the audioclipvoidsetVolume(float volume) Setting the volume of the audioclipvoidstop()Stopping the audioclip
-
Constructor Details
-
Audio
Constructor to get the audio resource
- Parameters:
path- The path to the specified audio file.- Since:
- 0.3.0
-
-
Method Details
-
play
public void play()Playing the audioclip
- Since:
- 0.3.0
-
stop
public void stop()Stopping the audioclip
- Since:
- 0.3.0
-
close
public void close()Closing the audioclip and deallocating it from memory
- Since:
- 0.3.0
-
loop
public void loop()Playing the audioclip on loop
- Since:
- 0.3.0
-
setVolume
public void setVolume(float volume) Setting the volume of the audioclip
- Parameters:
volume- The volume to be specified- Since:
- 0.3.0
-
isRunning
public boolean isRunning()Returning whether the audioclip is playing or not
- Since:
- 0.3.0
-