CPSound

object CPSound

Companion object with utility functionality.

Companion:
class
Source:
CPSound.scala
class Object
trait Matchable
class Any
CPSound.type

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

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.

Source:
CPSound.scala
def disposeAll(tags: 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.

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

Loops over all sounds call given function.

Loops over all sounds call 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.

Source:
CPSound.scala
def stopAll(fadeOutMs: Long, tags: 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.

See also:
Source:
CPSound.scala