# libkmid Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# PlayerController Struct Reference

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. Struct used to have control over the player engine. More...

`#include <player.h>`

Collaboration diagram for PlayerController:

[legend]
List of all members.

## Public Attributes

volatile ulong | ticksTotal
volatile ulong | ticksPlayed
volatile double | millisecsPlayed
volatile ulong | beginmillisec
volatile int | tempo
volatile int | num
volatile int | den
volatile int | SPEVprocessed
volatile int | SPEVplayed
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
volatile ulong | gotomsec
volatile int | error
| When error is 1, an error has ocurred (i.e.
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 | forcepgm [16]
| Activate or disactivate the force to use a patch for a given channel.
volatile int | pgm [16]
| Force a given patch in each channel at "this" moment, as determined by forcepgm.
volatile double | ratioTempo
| Ratio to multiply the tempo to.
volatile bool | isSendingAllNotesOff
volatile MidiEvent * | ev

## 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. Struct used to have control over the player engine.

Version:
  0.9.5 17/01/2000

Author:
  Antonio Larrosa Jimenez <larrosa@kde.org>

Definition at line 137 of file player.h.

## Member Data Documentation

volatile int PlayerController::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. Definition at line 156 of file player.h. Referenced by MidiPlayer::play().

volatile int PlayerController::playing

| When the player is playing (or paused), playing is set to 1. Definition at line 161 of file player.h. Referenced by MidiPlayer::play().

volatile int PlayerController::paused

| When the player is paused, paused is set to 1. Definition at line 166 of file player.h. Referenced by MidiPlayer::play().

volatile int PlayerController::moving

| When the player seeking the position of the song, moving is set to 1. Definition at line 171 of file player.h. Referenced by MidiPlayer::play().

volatile int PlayerController::finished

| When the player has finished playing a song, finished is set to 1. Definition at line 176 of file player.h. Referenced by MidiPlayer::play().

volatile int PlayerController::error

| When error is 1, an error has ocurred (i.e. it coultn't open the device) Definition at line 195 of file player.h. Referenced by MidiPlayer::play().

volatile int PlayerController::gm

| If gm is 1, the song follows the General Midi standard, if gm is 0, the song is in MT 32 format. Definition at line 201 of file player.h. Referenced by MidiPlayer::play().

volatile int PlayerController::volumepercentage

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

See also:
  DeviceManager::setVolumePercentage()

Definition at line 208 of file player.h.

Referenced by MidiPlayer::play().

volatile bool PlayerController::forcepgm[16]

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

See also:
  pgm

Definition at line 214 of file player.h.

Referenced by MidiPlayer::play(), and MidiPlayer::setPos().

volatile int PlayerController::pgm[16]

| Force a given patch in each channel at "this" moment, as determined by forcepgm. Definition at line 220 of file player.h. Referenced by MidiPlayer::play(), and MidiPlayer::setPos().

volatile double PlayerController::ratioTempo

| Ratio to multiply the tempo to. Definition at line 225 of file player.h. Referenced by MidiPlayer::loadSong(), MidiPlayer::play(), MidiPlayer::setPos(), and MidiPlayer::setTempoRatio().

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

- player.h

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:28:41 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001