AudioPlayer

eu.joaocosta.minart.audio.AudioPlayer
See theAudioPlayer companion object
trait AudioPlayer

Multi-channel mono audio player.

Can play and stop audio clips and audio waves on distinct channels.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def isPlaying(): Boolean

Checks if this player still has data to be played.

Checks if this player still has data to be played.

Attributes

Returns

true of the player is still playing, false otherwise

def isPlaying(channel: Int): Boolean

Checks if a channel still has data to be played.

Checks if a channel still has data to be played.

Value parameters

channel

channel to check

Attributes

Returns

true of the channel is still playing, false otherwise

def play(clip: AudioClip, channel: Int): Unit

Enqueues an audio clip to be played later in a certain channel.

Enqueues an audio clip to be played later in a certain channel.

Value parameters

channel

channel where to play the audio clip

clip

audio clip to play

Attributes

def stop(): Unit

Stops playback and removes all enqueued waves.

Stops playback and removes all enqueued waves.

Attributes

def stop(channel: Int): Unit

Stops playback and removes all enqueued waves in a certain channel.

Stops playback and removes all enqueued waves in a certain channel.

Value parameters

channel

channel to stop

Attributes

Concrete methods

def play(clip: AudioClip): Unit

Enqueues an audio clip to be played later in channel 0.

Enqueues an audio clip to be played later in channel 0.

Value parameters

clip

audio clip to play

Attributes

def play(wave: AudioWave): Unit

Enqueues an audio wave to be played later in channel 0. The Audio Wave will play infinitely until stop() is called.

Enqueues an audio wave to be played later in channel 0. The Audio Wave will play infinitely until stop() is called.

Value parameters

wave

audio wave to play

Attributes

def play(wave: AudioWave, channel: Int): Unit

Enqueues an audio wave to be played later in a certain channel. The Audio Wave will play infinitely until stop() is called.

Enqueues an audio wave to be played later in a certain channel. The Audio Wave will play infinitely until stop() is called.

Value parameters

channel

channel where to play the audio wave

wave

audio wave to play

Attributes