Interface Playable

All Known Subinterfaces:
Clip, Loop, MultiClip.Copy
All Known Implementing Classes:
Clip.Silence, Loop.Silence

public interface Playable
Shared controls for clips and loops.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if this playable is currently playing, false otherwise.
    void
    Starts this clip or loop playing.
    void
    Releases this playable when it is no longer needed.
    void
    setVolume(float volume)
    Configures the volume for this clip to a value between 0 and 1.
    void
    Stops this clip or loop (fading it out over one second).
    float
    Returns the current volume configured for this clip.
  • Method Details

    • volume

      float volume()
      Returns the current volume configured for this clip. Note that the actual volume will be the configured volume multiplied by the master volume of the owning soundboard.
    • setVolume

      void setVolume(float volume)
      Configures the volume for this clip to a value between 0 and 1. Note that the actual volume will be the configured volume multiplied by the master volume of the owning soundboard.
    • isPlaying

      boolean isPlaying()
      Returns true if this playable is currently playing, false otherwise.
    • play

      void play()
      Starts this clip or loop playing. If the sound data is not yet loaded it will be loaded and then played.
    • stop

      void stop()
      Stops this clip or loop (fading it out over one second).
    • release

      void release()
      Releases this playable when it is no longer needed. This releases any associated audio resources.If this playable is used again, the underlying sound will be reloaded.