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

libtdemid

  • libtdemid
alsaout.h
1 /* alsaout.cpp - class AlsaOut which represents an alsa client/port pair
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 _ALSAOUT_H
25 #define _ALSAOUT_H
26 
27 #include <libtdemid/midiout.h>
28 
29 struct snd_seq_event;
30 typedef struct snd_seq_event snd_seq_event_t;
31 
37 class AlsaOut : public MidiOut
38 {
39  friend class DeviceManager;
40 
41  protected:
42 
47  int ndevs;
48 
53  int nmidiports;
54 
55  double count;
56  double lastcount;
57  double lasttime;
58  double begintime;
59  int m_rate;
60 
65  double convertrate;
66 
67  long int time;
68 
69  virtual void seqbuf_dump (void);
70  virtual void seqbuf_clean(void);
71  void eventInit(snd_seq_event_t *ev);
72  void eventSend(snd_seq_event_t *ep);
73  void timerEventSend(int type);
74 
75  public:
76 
82  AlsaOut(int d, int client=64, int port=0, const char *cname="", const char *pname="");
83 
89  virtual ~AlsaOut();
90 
99  virtual void openDev (int sqfd);
100 
106  virtual void closeDev ();
107 
113  virtual void initDev ();
114 
129  int deviceType () const { return devicetype; }
130 
135  virtual const char * deviceName (void) const;
136 
140  int rate (void) { return m_rate; }
141 
145  virtual void noteOn ( uchar chn, uchar note, uchar vel );
146 
150  virtual void noteOff ( uchar chn, uchar note, uchar vel );
151 
155  virtual void keyPressure ( uchar chn, uchar note, uchar vel );
156 
160  virtual void chnPatchChange ( uchar chn, uchar patch );
161 
165  virtual void chnPressure ( uchar chn, uchar vel );
166 
170  virtual void chnPitchBender ( uchar chn, uchar lsb, uchar msb );
171 
175  virtual void chnController ( uchar chn, uchar ctl , uchar v );
176 
180  virtual void sysex ( uchar *data,ulong size);
181 
185  virtual void channelSilence ( uchar chn );
186 
194  virtual void channelMute ( uchar chn, int b );
195 
203  virtual void setVolumePercentage ( int volper )
204  { volumepercentage = volper; }
205 
209  int ok (void)
210  { if (seqfd<0) return 0;
211  return (_ok>0);
212  }
213 
214  virtual void wait (double ticks);
215  virtual void tmrSetTempo (int v);
216  virtual void tmrStart (int tpcn);
217  virtual void tmrStart () { tmrStart(-1); }
218  virtual void tmrStop ();
219  virtual void tmrContinue ();
225  void sync (int i=0);
226 
227  class AlsaOutPrivate;
228  AlsaOutPrivate *di;
229 };
230 
231 #endif // _ALSAOUT_H

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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for libtdemid by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.