summaryrefslogtreecommitdiffstats
path: root/src/engine/JackMidiDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-13 16:04:14 +0000
committerDavid Robillard <d@drobilla.net>2009-05-13 16:04:14 +0000
commitaa473d19780f2670bb828835ee7ce970571016cf (patch)
tree0483fcb2cc350b3cc2f660f22449f803ae12f93d /src/engine/JackMidiDriver.cpp
parent44ddb73018b96a6979b4339f4ba234e5c97741f8 (diff)
downloadingen-aa473d19780f2670bb828835ee7ce970571016cf.tar.gz
ingen-aa473d19780f2670bb828835ee7ce970571016cf.tar.bz2
ingen-aa473d19780f2670bb828835ee7ce970571016cf.zip
Strip trailing whitespace.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1999 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/JackMidiDriver.cpp')
-rw-r--r--src/engine/JackMidiDriver.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/engine/JackMidiDriver.cpp b/src/engine/JackMidiDriver.cpp
index c0b55a6b..5f01a6f4 100644
--- a/src/engine/JackMidiDriver.cpp
+++ b/src/engine/JackMidiDriver.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -38,7 +38,7 @@ using namespace Raul;
namespace Ingen {
-
+
//// JackMidiPort ////
JackMidiPort::JackMidiPort(JackMidiDriver* driver, DuplexPort* patch_port)
@@ -68,7 +68,7 @@ JackMidiPort::create()
_patch_port->path().c_str(), JACK_DEFAULT_MIDI_TYPE,
(_patch_port->is_input()) ? JackPortIsInput : JackPortIsOutput,
0);
-
+
if (_jack_port == NULL) {
cerr << "[JackMidiPort] ERROR: Failed to register port " << _patch_port->path() << endl;
throw JackAudioDriver::PortRegistrationFailedException();
@@ -96,7 +96,7 @@ JackMidiPort::pre_process(ProcessContext& context)
{
if ( ! is_input() )
return;
-
+
assert(_patch_port->poly() == 1);
EventBuffer* patch_buf = dynamic_cast<EventBuffer*>(_patch_port->buffer(0));
@@ -106,7 +106,7 @@ JackMidiPort::pre_process(ProcessContext& context)
const jack_nframes_t event_count = jack_midi_get_event_count(jack_buffer);
patch_buf->prepare_write(context.start(), context.nframes());
-
+
// Copy events from Jack port buffer into patch port buffer
for (jack_nframes_t i=0; i < event_count; ++i) {
jack_midi_event_t ev;
@@ -135,13 +135,13 @@ JackMidiPort::post_process(ProcessContext& context)
EventBuffer* patch_buf = dynamic_cast<EventBuffer*>(_patch_port->buffer(0));
void* jack_buf = jack_port_get_buffer(_jack_port, context.nframes());
-
+
assert(_patch_port->poly() == 1);
assert(patch_buf);
patch_buf->prepare_read(context.start(), context.nframes());
jack_midi_clear_buffer(jack_buf);
-
+
uint32_t frames = 0;
uint32_t subframes = 0;
uint16_t type = 0;
@@ -198,7 +198,7 @@ JackMidiDriver::attach(AudioDriver& driver)
/** Launch and start the MIDI thread.
*/
void
-JackMidiDriver::activate()
+JackMidiDriver::activate()
{
_is_activated = true;
}
@@ -207,7 +207,7 @@ JackMidiDriver::activate()
/** Terminate the MIDI thread.
*/
void
-JackMidiDriver::deactivate()
+JackMidiDriver::deactivate()
{
for (Raul::List<JackMidiPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i)
(*i)->destroy();
@@ -241,7 +241,7 @@ JackMidiDriver::post_process(ProcessContext& context)
*
* Realtime safe, this is to be called at the beginning of a process cycle to
* insert (and actually begin using) a new port.
- *
+ *
* See new_port() and remove_port().
*/
void
@@ -269,12 +269,12 @@ JackMidiDriver::remove_port(const Path& path)
for (Raul::List<JackMidiPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i)
if ((*i)->patch_port()->path() == path)
return (Raul::List<DriverPort*>::Node*)_ports.erase(i);
-
+
cerr << "[JackMidiDriver::remove_port] WARNING: Unable to find port " << path << endl;
return NULL;
}
-
+
DriverPort*
JackMidiDriver::driver_port(const Path& path)
{