• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libtdemid
 

libtdemid

  • libtdemid
voiceman.h
1 /* voiceman.h - The VoiceManager class handles a set of voices for synths
2  This file is part of LibKMid 0.9.5
3  Copyright (C) 1997,98,99,2000 Antonio Larrosa Jimenez
4  LibKMid's homepage : http://www.arrakis.es/~rlarrosa/libtdemid.html
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 
21  Send comments and bug fixes to Antonio Larrosa <larrosa@kde.org>
22 
23 ***************************************************************************/
24 #ifndef _VOICEMAN_H
25 #define _VOICEMAN_H
26 
35 class VoiceManager
36 {
37  private:
38  class VoiceManagerPrivate;
39  VoiceManagerPrivate *d;
40 
44  int nvoices;
45 
49  struct voice
50  {
51  int id;
52  int channel;
53  int note;
54  int used;
55 
56  struct voice *prev;
57  struct voice *next;
58  };
59 
64  voice *FirstVoice;
65 
69  voice *LastVoice;
70 
75  voice *LastnotusedVoice;
76 
80  voice **VoiceList;
81 
86  voice *searcher;
87 
92  voice *searcher_aid;
93 
94  public:
98  VoiceManager(int totalvoices);
99 
103  ~VoiceManager();
104 
112  int allocateVoice(int chn,int key);
113 
119  void deallocateVoice(int id);
120 
127  void initSearch(void);
128 
138  int search(int chn);
139  //returns -1 if channel chn is not currently used
140  // Continue searching for more voices which
141  // use the channel chn
142 
149  int search(int chn,int note);
150 
154  int channel(int v) {return VoiceList[v]->channel;}
155 
159  int note(int v) {return VoiceList[v]->note;}
160 
164  int used(int v) {return VoiceList[v]->used;}
165 
169  void clearLists(void);
170 };
171 
172 #endif
TDEStdAccel::next
const TDEShortcut & next()

libtdemid

Skip menu "libtdemid"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

libtdemid

Skip menu "libtdemid"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for libtdemid by doxygen 1.8.8
This website is maintained by Timothy Pearson.