/[svn]/linuxsampler/trunk/src/mididriver/MidiInputDeviceMidiShare.h
ViewVC logotype

Contents of /linuxsampler/trunk/src/mididriver/MidiInputDeviceMidiShare.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 86 - (show annotations) (download) (as text)
Mon May 24 12:41:50 2004 UTC (19 years, 11 months ago) by letz
File MIME type: text/x-c++hdr
File size: 2967 byte(s)
* First import of MidiShare device

1 /***************************************************************************
2 * *
3 * LinuxSampler - modular, streaming capable sampler *
4 * *
5 * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck *
6 * Copyright (C) 2004 Grame *
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21 * MA 02111-1307 USA *
22 ***************************************************************************/
23
24 #ifndef __LS_MIDIINPUTDEVICEMIDISHARE1_H__
25 #define __LS_MIDIINPUTDEVICEMIDISHARE1_H__
26
27 #include <MidiShare.h>
28
29 #include "../common/global.h"
30 #include "../common/Thread.h"
31 #include "../common/RingBuffer.h"
32 #include "MidiInputDevice.h"
33
34 namespace LinuxSampler {
35
36 /** MidiShare input driver
37 *
38 * Implements MIDI input using MidiShare
39 */
40 class MidiInputDeviceMidiShare : public MidiInputDevice {
41 public:
42 MidiInputDeviceMidiShare(char* AutoConnectPortID = NULL);
43 ~MidiInputDeviceMidiShare();
44
45 // derived abstract methods from class 'MidiInputDevice'
46 void Listen(){}
47 void StopListen(){}
48 void SetInputPort(const char *);
49
50 // own methods
51 void ConnectToCoreMidiSource(const char* MidiSource);
52
53 void OpenAppl();
54 void CloseAppl();
55 void OpenDriver();
56 void CloseDriver();
57
58 // MidiShare callback
59 static void ApplAlarm(short ref, long code);
60 static void ReceiveEvents(short ref);
61 static void KeyOffTask(long date, short ref, long a1, long a2, long a3);
62 static void WakeUp(short r);
63 static void Sleep(short r);
64
65 private:
66 short hRefnum;
67 MidiFilterPtr hMidiFilter;
68 SlotRefNum hSlotRef;
69 };
70 }
71
72 #endif // __LS_MIDIINPUTDEVICEMIDISHARE1_H__

  ViewVC Help
Powered by ViewVC