struct PlayerController

Struct used to have control over the player engine. More...

Definition#include <player.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members


Detailed Description

PlayerController is a struct that is used by the MidiPlayer object to tell other parts of the application about the status of the MIDI playing.

volatile int OK

When pause is released, if the caller must know when the player has opened the devices and is playing again, then it just has to check to see when OK changes the value to 1

volatile int playing

When the player is playing (or paused), playing is set to 1.

volatile int paused

When the player is paused, paused is set to 1.

volatile int moving

When the player seeking the position of the song, moving is set to 1.

volatile int finished

When the player has finished playing a song, finished is set to 1.

volatile int message

Not used

volatile int error

When error is 1, an error has ocurred (i.e. it coultn't open the device)

volatile int gm

If gm is 1, the song follows the General Midi standard, if gm is 0, the song is in MT 32 format.

volatile int volumepercentage

100 means no change, 50 halfs the volume, 200 doubles it (if possible), etc.

volatile bool [16] forcepgm

Activate or disactivate the force to use a patch for a given channel.

volatile int [16] pgm

Force a given patch in each channel at "this" moment, as determined by forcepgm.

volatile double ratioTempo

Ratio to multiply the tempo to.