/[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 1858 - (show annotations) (download)
Sun Mar 8 09:57:19 2009 UTC (15 years ago) by persson
File size: 3201 byte(s)
* optimized the DSSI plugin: all plugin instances now share the same
  disk streaming buffers
* added support for the "fine tune" and "pitch bend range"
  instrument-level gig parameters
* fixed minor artifacts in pitch bend handling

1 /***************************************************************************
2 * *
3 * Copyright (C) 2008 - 2009 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 int portNumber) :
30 MidiInputPort(pDevice, portNumber) {
31 }
32
33
34
35 // *************** MidiInputDevicePlugin ***************
36 // *
37
38 MidiInputDevicePlugin::MidiInputDevicePlugin(std::map<String, DeviceCreationParameter*> Parameters,
39 void* pSampler) :
40 MidiInputDevice(Parameters, pSampler) {
41 AcquirePorts(1);
42 }
43
44 MidiInputDevicePlugin::~MidiInputDevicePlugin() {
45 for (std::map<int, MidiInputPort*>::iterator iter =
46 Ports.begin() ; iter != Ports.end() ; iter++) {
47 delete dynamic_cast<MidiInputPortPlugin*>(iter->second);
48 }
49 Ports.clear();
50 }
51
52 void MidiInputDevicePlugin::Listen() {
53 }
54
55 void MidiInputDevicePlugin::StopListen() {
56 }
57
58 String MidiInputDevicePlugin::Driver() {
59 return Name();
60 }
61
62 String MidiInputDevicePlugin::Name() {
63 return "Plugin";
64 }
65
66 String MidiInputDevicePlugin::Version() {
67 String s = "$Revision: 1.2 $";
68 return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
69 }
70
71 String MidiInputDevicePlugin::Description() {
72 return Name();
73 }
74
75 MidiInputPort* MidiInputDevicePlugin::CreateMidiPort() {
76 return new MidiInputPortPlugin(this, Ports.size());
77 }
78
79 void MidiInputDevicePlugin::DeleteMidiPort(MidiInputPort* pPort) {
80 delete (MidiInputPortPlugin*)pPort;
81 }
82 }

  ViewVC Help
Powered by ViewVC