summaryrefslogtreecommitdiffstats
path: root/src/server/internals
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-24 19:27:39 +0000
committerDavid Robillard <d@drobilla.net>2015-10-24 19:27:39 +0000
commit732bfb33105b4a534bc17caae9a50a1ccfcd7570 (patch)
treebad9715a99f11d17342adaef372361c3697beee9 /src/server/internals
parentade7143eb2af64fd6743a64ebf1786dd5bbe1092 (diff)
downloadingen-732bfb33105b4a534bc17caae9a50a1ccfcd7570.tar.gz
ingen-732bfb33105b4a534bc17caae9a50a1ccfcd7570.tar.bz2
ingen-732bfb33105b4a534bc17caae9a50a1ccfcd7570.zip
Zero-copy to/from driver ports where possible
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5778 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/internals')
-rw-r--r--src/server/internals/Controller.cpp4
-rw-r--r--src/server/internals/Controller.hpp4
-rw-r--r--src/server/internals/Delay.cpp2
-rw-r--r--src/server/internals/Delay.hpp4
-rw-r--r--src/server/internals/Note.cpp4
-rw-r--r--src/server/internals/Note.hpp4
-rw-r--r--src/server/internals/Time.cpp4
-rw-r--r--src/server/internals/Time.hpp4
-rw-r--r--src/server/internals/Trigger.cpp4
-rw-r--r--src/server/internals/Trigger.hpp4
10 files changed, 19 insertions, 19 deletions
diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp
index d52dc59f..8913d293 100644
--- a/src/server/internals/Controller.cpp
+++ b/src/server/internals/Controller.cpp
@@ -47,7 +47,7 @@ ControllerNode::ControllerNode(InternalPlugin* plugin,
bool polyphonic,
GraphImpl* parent,
SampleRate srate)
- : BlockImpl(plugin, symbol, false, parent, srate)
+ : InternalBlock(plugin, symbol, false, parent, srate)
, _learning(false)
{
const Ingen::URIs& uris = bufs.uris();
@@ -103,7 +103,7 @@ void
ControllerNode::run(ProcessContext& context)
{
Buffer* const midi_in = _midi_in_port->buffer(0).get();
- LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)midi_in->atom();
+ LV2_Atom_Sequence* seq = midi_in->get<LV2_Atom_Sequence>();
LV2_ATOM_SEQUENCE_FOREACH(seq, ev) {
const uint8_t* buf = (const uint8_t*)LV2_ATOM_BODY(&ev->body);
if (ev->body.type == _midi_in_port->bufs().uris().midi_MidiEvent &&
diff --git a/src/server/internals/Controller.hpp b/src/server/internals/Controller.hpp
index 8f5bd766..4eb1f508 100644
--- a/src/server/internals/Controller.hpp
+++ b/src/server/internals/Controller.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_INTERNALS_CONTROLLER_HPP
#define INGEN_INTERNALS_CONTROLLER_HPP
-#include "BlockImpl.hpp"
+#include "InternalBlock.hpp"
namespace Ingen {
namespace Server {
@@ -35,7 +35,7 @@ namespace Internals {
*
* \ingroup engine
*/
-class ControllerNode : public BlockImpl
+class ControllerNode : public InternalBlock
{
public:
ControllerNode(InternalPlugin* plugin,
diff --git a/src/server/internals/Delay.cpp b/src/server/internals/Delay.cpp
index 16b20a3f..d0413689 100644
--- a/src/server/internals/Delay.cpp
+++ b/src/server/internals/Delay.cpp
@@ -55,7 +55,7 @@ DelayNode::DelayNode(InternalPlugin* plugin,
bool polyphonic,
GraphImpl* parent,
SampleRate srate)
- : BlockImpl(plugin, symbol, polyphonic, parent, srate)
+ : InternalBlock(plugin, symbol, polyphonic, parent, srate)
, _buffer(0)
, _buffer_length(0)
, _buffer_mask(0)
diff --git a/src/server/internals/Delay.hpp b/src/server/internals/Delay.hpp
index 51e8e276..24f2854e 100644
--- a/src/server/internals/Delay.hpp
+++ b/src/server/internals/Delay.hpp
@@ -19,7 +19,7 @@
#include <math.h>
-#include "BlockImpl.hpp"
+#include "InternalBlock.hpp"
#include "types.hpp"
namespace Ingen {
@@ -32,7 +32,7 @@ class BufferFactory;
namespace Internals {
-class DelayNode : public BlockImpl
+class DelayNode : public InternalBlock
{
public:
DelayNode(InternalPlugin* plugin,
diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp
index feb3890f..c3ebaf71 100644
--- a/src/server/internals/Note.cpp
+++ b/src/server/internals/Note.cpp
@@ -52,7 +52,7 @@ NoteNode::NoteNode(InternalPlugin* plugin,
bool polyphonic,
GraphImpl* parent,
SampleRate srate)
- : BlockImpl(plugin, symbol, polyphonic, parent, srate)
+ : InternalBlock(plugin, symbol, polyphonic, parent, srate)
, _voices(new Raul::Array<Voice>(_polyphony))
, _prepared_voices(NULL)
, _sustain(false)
@@ -171,7 +171,7 @@ void
NoteNode::run(ProcessContext& context)
{
Buffer* const midi_in = _midi_in_port->buffer(0).get();
- LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)midi_in->atom();
+ LV2_Atom_Sequence* seq = midi_in->get<LV2_Atom_Sequence>();
LV2_ATOM_SEQUENCE_FOREACH(seq, ev) {
const uint8_t* buf = (const uint8_t*)LV2_ATOM_BODY_CONST(&ev->body);
const FrameTime time = context.start() + (FrameTime)ev->time.frames;
diff --git a/src/server/internals/Note.hpp b/src/server/internals/Note.hpp
index 111d3f1a..6e993f06 100644
--- a/src/server/internals/Note.hpp
+++ b/src/server/internals/Note.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_INTERNALS_NOTE_HPP
#define INGEN_INTERNALS_NOTE_HPP
-#include "BlockImpl.hpp"
+#include "InternalBlock.hpp"
#include "types.hpp"
namespace Ingen {
@@ -35,7 +35,7 @@ namespace Internals {
*
* \ingroup engine
*/
-class NoteNode : public BlockImpl
+class NoteNode : public InternalBlock
{
public:
NoteNode(InternalPlugin* plugin,
diff --git a/src/server/internals/Time.cpp b/src/server/internals/Time.cpp
index b03f427c..13f63538 100644
--- a/src/server/internals/Time.cpp
+++ b/src/server/internals/Time.cpp
@@ -42,7 +42,7 @@ TimeNode::TimeNode(InternalPlugin* plugin,
bool polyphonic,
GraphImpl* parent,
SampleRate srate)
- : BlockImpl(plugin, symbol, false, parent, srate)
+ : InternalBlock(plugin, symbol, false, parent, srate)
{
const Ingen::URIs& uris = bufs.uris();
_ports = new Raul::Array<PortImpl*>(1);
@@ -60,7 +60,7 @@ void
TimeNode::run(ProcessContext& context)
{
BufferRef buf = _notify_port->buffer(0);
- LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)buf->atom();
+ LV2_Atom_Sequence* seq = buf->get<LV2_Atom_Sequence>();
// Initialise output to the empty sequence
seq->atom.type = _notify_port->bufs().uris().atom_Sequence;
diff --git a/src/server/internals/Time.hpp b/src/server/internals/Time.hpp
index bd98827c..f8dfbd64 100644
--- a/src/server/internals/Time.hpp
+++ b/src/server/internals/Time.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_INTERNALS_TIME_HPP
#define INGEN_INTERNALS_TIME_HPP
-#include "BlockImpl.hpp"
+#include "InternalBlock.hpp"
namespace Ingen {
namespace Server {
@@ -34,7 +34,7 @@ namespace Internals {
*
* \ingroup engine
*/
-class TimeNode : public BlockImpl
+class TimeNode : public InternalBlock
{
public:
TimeNode(InternalPlugin* plugin,
diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp
index 1fa57ba9..d34b38c1 100644
--- a/src/server/internals/Trigger.cpp
+++ b/src/server/internals/Trigger.cpp
@@ -47,7 +47,7 @@ TriggerNode::TriggerNode(InternalPlugin* plugin,
bool polyphonic,
GraphImpl* parent,
SampleRate srate)
- : BlockImpl(plugin, symbol, false, parent, srate)
+ : InternalBlock(plugin, symbol, false, parent, srate)
, _learning(false)
{
const Ingen::URIs& uris = bufs.uris();
@@ -99,7 +99,7 @@ void
TriggerNode::run(ProcessContext& context)
{
Buffer* const midi_in = _midi_in_port->buffer(0).get();
- LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)midi_in->atom();
+ LV2_Atom_Sequence* seq = midi_in->get<LV2_Atom_Sequence>();
LV2_ATOM_SEQUENCE_FOREACH(seq, ev) {
const uint8_t* buf = (const uint8_t*)LV2_ATOM_BODY(&ev->body);
if (ev->body.type == _midi_in_port->bufs().uris().midi_MidiEvent &&
diff --git a/src/server/internals/Trigger.hpp b/src/server/internals/Trigger.hpp
index f3fae245..f486ef38 100644
--- a/src/server/internals/Trigger.hpp
+++ b/src/server/internals/Trigger.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_INTERNALS_TRIGGER_HPP
#define INGEN_INTERNALS_TRIGGER_HPP
-#include "BlockImpl.hpp"
+#include "InternalBlock.hpp"
namespace Ingen {
namespace Server {
@@ -38,7 +38,7 @@ namespace Internals {
*
* \ingroup engine
*/
-class TriggerNode : public BlockImpl
+class TriggerNode : public InternalBlock
{
public:
TriggerNode(InternalPlugin* plugin,