1 |
/*************************************************************************** |
/*************************************************************************** |
2 |
* * |
* * |
3 |
* Copyright (C) 2008 - 2012 Andreas Persson * |
* Copyright (C) 2008 - 2012 Andreas Persson * |
4 |
|
* Copyright (C) 2014 - 2016 Christian Schoenebeck * |
5 |
* * |
* * |
6 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
7 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
84 |
} |
} |
85 |
|
|
86 |
MidiInputPort* MidiInputDevicePlugin::CreateMidiPort() { |
MidiInputPort* MidiInputDevicePlugin::CreateMidiPort() { |
87 |
return new MidiInputPortPlugin(this, Ports.size()); |
return new MidiInputPortPlugin(this, (int)Ports.size()); |
88 |
} |
} |
89 |
|
|
90 |
void MidiInputDevicePlugin::AddMidiPort() { |
void MidiInputDevicePlugin::AddMidiPort() { |
91 |
static_cast<ParameterPortsPlugin*>( |
static_cast<ParameterPortsPlugin*>( |
92 |
Parameters["PORTS"])->ForceSetValue(Ports.size() + 1); |
Parameters["PORTS"])->ForceSetValue((int)Ports.size() + 1); |
93 |
} |
} |
94 |
|
|
95 |
void MidiInputDevicePlugin::RemoveMidiPort(MidiInputPort* pPort) { |
void MidiInputDevicePlugin::RemoveMidiPort(MidiInputPort* pPort) { |
110 |
|
|
111 |
// delete the last port |
// delete the last port |
112 |
static_cast<ParameterPortsPlugin*>( |
static_cast<ParameterPortsPlugin*>( |
113 |
Parameters["PORTS"])->ForceSetValue(Ports.size() - 1); |
Parameters["PORTS"])->ForceSetValue((int)Ports.size() - 1); |
114 |
} |
} |
115 |
|
|
116 |
bool MidiInputDevicePlugin::isAutonomousDevice() { |
bool MidiInputDevicePlugin::isAutonomousDevice() { |