summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/JackAudioDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-08 06:04:32 +0000
committerDavid Robillard <d@drobilla.net>2007-04-08 06:04:32 +0000
commite96c36c1a7abb062e36efc0ac95c35fedcef922e (patch)
tree826d5caa0392201472d12c02a1c3df4cf7b275be /src/libs/engine/JackAudioDriver.cpp
parent7d69e89f22304e37fa325ce4f39a374a02072a69 (diff)
downloadingen-e96c36c1a7abb062e36efc0ac95c35fedcef922e.tar.gz
ingen-e96c36c1a7abb062e36efc0ac95c35fedcef922e.tar.bz2
ingen-e96c36c1a7abb062e36efc0ac95c35fedcef922e.zip
De-template-ification of port types (req. for LV2 MIDI, but nice code size reduction).
LV2 MIDI patching support (LV2 style MIDI throughout, inc. internal plugins). git-svn-id: http://svn.drobilla.net/lad/ingen@415 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/JackAudioDriver.cpp')
-rw-r--r--src/libs/engine/JackAudioDriver.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp
index df03dcb8..dd52d2b2 100644
--- a/src/libs/engine/JackAudioDriver.cpp
+++ b/src/libs/engine/JackAudioDriver.cpp
@@ -34,6 +34,7 @@
#include "MidiDriver.h"
#include "DuplexPort.h"
#include "EventSource.h"
+#include "AudioBuffer.h"
#ifdef HAVE_LASH
#include "LashDriver.h"
#endif
@@ -46,7 +47,7 @@ namespace Ingen {
//// JackAudioPort ////
-JackAudioPort::JackAudioPort(JackAudioDriver* driver, DuplexPort<Sample>* patch_port)
+JackAudioPort::JackAudioPort(JackAudioDriver* driver, DuplexPort* patch_port)
: DriverPort(patch_port->is_input()),
Raul::ListNode<JackAudioPort*>(this),
_driver(driver),
@@ -83,9 +84,11 @@ JackAudioPort::prepare_buffer(jack_nframes_t nframes)
*/
jack_sample_t* jack_buf = (jack_sample_t*)jack_port_get_buffer(_jack_port, nframes);
+ AudioBuffer* patch_buf = (AudioBuffer*)_patch_port->buffer(0);
+
if (jack_buf != _jack_buffer) {
//cerr << "Jack buffer: " << jack_buf << endl;
- _patch_port->buffer(0)->set_data(jack_buf);
+ patch_buf->set_data(jack_buf);
_jack_buffer = jack_buf;
}
@@ -100,7 +103,7 @@ JackAudioPort::prepare_buffer(jack_nframes_t nframes)
//m_patch_port->fixed_buffers(true);
//assert(_patch_port->buffer(0)->data() == _patch_port->tied_port()->buffer(0)->data());
- assert(_patch_port->buffer(0)->data() == jack_buf);
+ assert(patch_buf->data() == jack_buf);
}
@@ -257,7 +260,7 @@ JackAudioDriver::port(const Path& path)
DriverPort*
-JackAudioDriver::create_port(DuplexPort<Sample>* patch_port)
+JackAudioDriver::create_port(DuplexPort* patch_port)
{
if (patch_port->buffer_size() == _buffer_size)
return new JackAudioPort(this, patch_port);