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

Concise view

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.

Attributes

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].

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

Shortcut constructor for the sound.

Shortcut constructor for the sound.

Attributes

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.

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

Disposes all sounds.

Disposes all sounds.

Attributes

tags

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

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.

Attributes

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.

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

Stops all sounds playback in the system.

Stops all sounds playback in the system.

Attributes

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.

See also:
Source:
CPSound.scala