VoiceManager Class Reference

List of all members.

Detailed Description

Definition at line 35 of file voiceman.h.


Public Member Functions

 VoiceManager (int totalvoices)
 ~VoiceManager ()
int allocateVoice (int chn, int key)
void deallocateVoice (int id)
void initSearch (void)
int search (int chn)
int search (int chn, int note)
int channel (int v)
int note (int v)
int used (int v)
void clearLists (void)

Constructor & Destructor Documentation

VoiceManager::VoiceManager int  totalvoices  ) 
 

Cronstructor.

Definition at line 33 of file voiceman.cc.

VoiceManager::~VoiceManager  ) 
 

Destructor.

Definition at line 72 of file voiceman.cc.


Member Function Documentation

int VoiceManager::allocateVoice int  chn,
int  key
 

Allocates a voice used in channel chn, and playing key key.

Returns:
the voice that should be used.
See also:
deallocateVoice

Definition at line 113 of file voiceman.cc.

int VoiceManager::channel int  v  )  [inline]
 

Returns the channel that voice v is using.

Definition at line 154 of file voiceman.h.

void VoiceManager::clearLists void   ) 
 

Clears the lists of used voices.

Definition at line 95 of file voiceman.cc.

void VoiceManager::deallocateVoice int  id  ) 
 

Deallocates the voice with ID id.

See also:
allocateVoice

Definition at line 151 of file voiceman.cc.

void VoiceManager::initSearch void   ) 
 

initSearch() must be called always before search() to initialize internal variables.

See also:
search

Definition at line 229 of file voiceman.cc.

int VoiceManager::note int  v  )  [inline]
 

Returns the note that voice v is playing.

Definition at line 159 of file voiceman.h.

int VoiceManager::search int  chn,
int  note
 

This is a convenience function that differs from the above in that it also looks for a specific note (the second parameter).

See also:
initSearch

Definition at line 252 of file voiceman.cc.

int VoiceManager::search int  chn  ) 
 

Returns -1 if channel chn is not currently used, or a voice using channel chn if any.

Calling search repeteadly, will return all the voices using channel chn, and a -1 after the last one.

See also:
initSearch

Definition at line 235 of file voiceman.cc.

int VoiceManager::used int  v  )  [inline]
 

Returns true or false if the voice v is being used or not respectively.

Definition at line 164 of file voiceman.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys