CPSound

org.cosplay.CPSound$
See theCPSound companion class
object CPSound

Companion object with utility functionality.

Attributes

Companion
class
Source
CPSound.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CPSound.type

Members list

Value members

Concrete methods

def apply(src: String, vol: Double, tags: Set[String]): CPSound

Shortcut constructor for the sound with specific volume.

Shortcut constructor for the sound with specific volume.

Value parameters

src

RFC-2396 URI as required by java.net.URI or 'resource' file. URI should point to a sound file in one of the supported format: AIFF, AU or WAV. Only HTTP, FILE, and JAR URIs are supported.

tags

Optional set of organizational tags. Default is an empty set.

vol

Audio volume to set. Audio volume range is [0.0, 1.0].

Attributes

Source
CPSound.scala
def apply(src: String): CPSound

Shortcut constructor for the sound.

Shortcut constructor for the sound.

Value parameters

src

RFC-2396 URI as required by java.net.URI or 'resource' file. URI should point to a sound file in one of the supported format: AIFF, AU or WAV. Only HTTP, FILE, and JAR URIs are supported.

Attributes

Source
CPSound.scala
def disposeAll(tags: Set[String]): Unit

Disposes all sounds.

Disposes all sounds.

Value parameters

tags

Optional set of tags to filter the sounds to dispose. If not provided, all sounds will be disposed.

Attributes

See also
Source
CPSound.scala
def foreach(f: CPSound => Unit, tags: String*): Unit

Loops over all sounds in the system calling given function.

Loops over all sounds in the system calling given function.

Value parameters

f

Function to call on each sounds.

tags

Optional set of tags to filter the sounds to loop over. If not provided, all sounds will be used.

Attributes

Source
CPSound.scala
def stopAll(fadeOutMs: Long, tags: Set[String]): Unit

Stops all sounds playback in the system.

Stops all sounds playback in the system.

Value parameters

fadeOutMs

Fade out duration in milliseconds.

tags

Optional set of tags to filter the sounds to stop. If not provided, all sounds will be stopped.

Attributes

See also
Source
CPSound.scala