java.lang.Object
dev.aurumbyte.sypherengine.core.audio.Audio

public class Audio extends Object
The Audio Engine
Since:
v0.3.0
Author:
AurumByte
  • Constructor Summary

    Constructors
    Constructor
    Description
    Audio(String path)
    Constructor to get the audio resource
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closing the audioclip and deallocating it from memory
    boolean
    Returning whether the audioclip is playing or not
    void
    Playing the audioclip on loop
    void
    Playing the audioclip
    void
    setVolume(float volume)
    Setting the volume of the audioclip
    void
    Stopping the audioclip

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Audio

      public Audio(String path)

      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