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 | ) |
VoiceManager::~VoiceManager | ( | ) |
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 110 of file voiceman.cc.
void VoiceManager::deallocateVoice | ( | int | id | ) |
Deallocates the voice with ID id
.
- See also:
- allocateVoice
Definition at line 148 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 226 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 232 of file voiceman.cc.
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 249 of file voiceman.cc.
int VoiceManager::channel | ( | int | v | ) | [inline] |
int VoiceManager::note | ( | int | v | ) | [inline] |
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.
void VoiceManager::clearLists | ( | void | ) |
The documentation for this class was generated from the following files: