Class Clip.Silence

java.lang.Object
tripleplay.sound.Clip.Silence
All Implemented Interfaces:
Clip, Playable
Enclosing interface:
Clip

public static class Clip.Silence extends Object implements Clip
A noop clip.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface tripleplay.sound.Clip

    Clip.Silence
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Views this clip as a Sound.
    void
    fadeIn(float fadeMillis)
    Fades this clip in over the specified duration.
    void
    fadeOut(float fadeMillis)
    Fades this clip out over the specified duration.
    boolean
    Returns true if this playable is currently playing, false otherwise.
    void
    Starts this clip or loop playing.
    void
    Preloads this clip's underlying audio data.
    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.

    Methods inherited from class java.lang.Object

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

    • Silence

      public Silence()
  • Method Details

    • volume

      public float volume()
      Description copied from interface: Playable
      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.
      Specified by:
      volume in interface Playable
    • setVolume

      public void setVolume(float volume)
      Description copied from interface: Playable
      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.
      Specified by:
      setVolume in interface Playable
    • isPlaying

      public boolean isPlaying()
      Description copied from interface: Playable
      Returns true if this playable is currently playing, false otherwise.
      Specified by:
      isPlaying in interface Playable
    • play

      public void play()
      Description copied from interface: Playable
      Starts this clip or loop playing. If the sound data is not yet loaded it will be loaded and then played.
      Specified by:
      play in interface Playable
    • fadeIn

      public void fadeIn(float fadeMillis)
      Description copied from interface: Clip
      Fades this clip in over the specified duration.
      Specified by:
      fadeIn in interface Clip
    • fadeOut

      public void fadeOut(float fadeMillis)
      Description copied from interface: Clip
      Fades this clip out over the specified duration.
      Specified by:
      fadeOut in interface Clip
    • stop

      public void stop()
      Description copied from interface: Playable
      Stops this clip or loop (fading it out over one second).
      Specified by:
      stop in interface Playable
    • release

      public void release()
      Description copied from interface: Playable
      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.
      Specified by:
      release in interface Playable
    • preload

      public void preload()
      Description copied from interface: Clip
      Preloads this clip's underlying audio data.
      Specified by:
      preload in interface Clip
    • asSound

      public Sound asSound()
      Description copied from interface: Clip
      Views this clip as a Sound. Only the Sound.play() and Sound.stop() methods can be used. Useful for passing a clip into code that expects Sound.
      Specified by:
      asSound in interface Clip