FemtoIDE Java API  v0.0.18b
femto.sound.Mixer Class Reference

Provides an interface to the hardware's sound playing capabilities. More...

Static Public Member Functions

static void init ()
 Initialises the Mixer's global state. This method must be called before any of Mixer's other methods can be used.
 
static void init (int frequency)
 Initialises the Mixer's global state. This method must be called before any of Mixer's other methods can be used. More...
 
static Procedural getChannel (int channel)
 Get the sound currently associated to a specified channel. More...
 
static void setChannel (int channel, Procedural proc)
 Assign the specified sound to be played on the specified channel. More...
 
static void setVolume (int volume)
 Sets the master volume for all played sounds. More...
 
static void onIRQ ()
 The interrupt request handler. This method must not be called from user code.
 

Detailed Description

Provides an interface to the hardware's sound playing capabilities.

Member Function Documentation

◆ getChannel()

static Procedural femto.sound.Mixer.getChannel ( int  channel)
static

Get the sound currently associated to a specified channel.

Parameters
channelThe channel to get the sound from. Must be between 0 and 3 inclusive.

◆ init()

static void femto.sound.Mixer.init ( int  frequency)
static

Initialises the Mixer's global state. This method must be called before any of Mixer's other methods can be used.

Parameters
frequencyThe frequency at which the sound output is to be updated. Must be a positive value.

◆ setChannel()

static void femto.sound.Mixer.setChannel ( int  channel,
Procedural  proc 
)
static

Assign the specified sound to be played on the specified channel.

Parameters
channelThe channel to play the sound on. Must be between 0 and 3 inclusive.
procThe sound to be assigned to the channel.

◆ setVolume()

static void femto.sound.Mixer.setVolume ( int  volume)
static

Sets the master volume for all played sounds.

Parameters
volumeThe volume level. Must be between 0 and 4 inclusive.

The documentation for this class was generated from the following file: