/[svn]/linuxsampler/trunk/src/drivers/midi/MidiInputDevicePlugin.cpp
ViewVC logotype

Contents of /linuxsampler/trunk/src/drivers/midi/MidiInputDevicePlugin.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1777 - (show annotations) (download)
Mon Sep 15 16:58:10 2008 UTC (15 years, 7 months ago) by persson
File size: 2972 byte(s)
* added experimental support for running LinuxSampler as a DSSI, LV2
  and VST plugin

1 /***************************************************************************
2 * *
3 * Copyright (C) 2008 Andreas Persson *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
18 * MA 02110-1301 USA *
19 ***************************************************************************/
20
21 #include "MidiInputDevicePlugin.h"
22
23 namespace LinuxSampler {
24
25 // *************** MidiInputPortPlugin ***************
26 // *
27
28 MidiInputDevicePlugin::MidiInputPortPlugin::MidiInputPortPlugin(MidiInputDevicePlugin* pDevice) :
29 MidiInputPort(pDevice, 0) {
30 }
31
32
33
34 // *************** MidiInputDevicePlugin ***************
35 // *
36
37 MidiInputDevicePlugin::MidiInputDevicePlugin(std::map<String, DeviceCreationParameter*> Parameters,
38 void* pSampler) :
39 MidiInputDevice(Parameters, pSampler) {
40 AcquirePorts(1);
41 }
42
43 MidiInputDevicePlugin::~MidiInputDevicePlugin() {
44 for (std::map<int, MidiInputPort*>::iterator iter =
45 Ports.begin() ; iter != Ports.end() ; iter++) {
46 delete dynamic_cast<MidiInputPortPlugin*>(iter->second);
47 }
48 Ports.clear();
49 }
50
51 void MidiInputDevicePlugin::Listen() {
52 }
53
54 void MidiInputDevicePlugin::StopListen() {
55 }
56
57 String MidiInputDevicePlugin::Driver() {
58 return Name();
59 }
60
61 String MidiInputDevicePlugin::Name() {
62 return "Plugin";
63 }
64
65 String MidiInputDevicePlugin::Version() {
66 String s = "$Revision: 1.1 $";
67 return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
68 }
69
70 String MidiInputDevicePlugin::Description() {
71 return Name();
72 }
73
74 MidiInputPort* MidiInputDevicePlugin::CreateMidiPort() {
75 return new MidiInputPortPlugin(this);
76 }
77 }

  ViewVC Help
Powered by ViewVC