AudioPlayer

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

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

Concise view

Value members

Abstract methods

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

Attributes

channel

channel where to play the audio clip

clip

audio clip to play

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.

Attributes

channel

channel to stop

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.

Attributes

clip

audio clip to play

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.

Attributes

wave

audio wave to play

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.

Attributes

channel

channel where to play the audio wave

wave

audio wave to play