Package tripleplay.sound
Class Clip.Silence
java.lang.Object
tripleplay.sound.Clip.Silence
- Enclosing interface:
Clip
A noop clip.
-
Nested Class Summary
Nested classes/interfaces inherited from interface tripleplay.sound.Clip
Clip.Silence
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasSound()
Views this clip as aSound
.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
play()
Starts this clip or loop playing.void
preload()
Preloads this clip's underlying audio data.void
release()
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
stop()
Stops this clip or loop (fading it out over one second).float
volume()
Returns the current volume configured for this clip.
-
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. -
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. -
isPlaying
public boolean isPlaying()Description copied from interface:Playable
Returns true if this playable is currently playing, false otherwise. -
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. -
fadeIn
public void fadeIn(float fadeMillis) Description copied from interface:Clip
Fades this clip in over the specified duration. -
fadeOut
public void fadeOut(float fadeMillis) Description copied from interface:Clip
Fades this clip out over the specified duration. -
stop
public void stop()Description copied from interface:Playable
Stops this clip or loop (fading it out over one second). -
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. -
preload
public void preload()Description copied from interface:Clip
Preloads this clip's underlying audio data. -
asSound
Description copied from interface:Clip
Views this clip as aSound
. Only theSound.play()
andSound.stop()
methods can be used. Useful for passing a clip into code that expectsSound
.
-