summaryrefslogtreecommitdiffstats
path: root/src/engine/PortImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-11-18 00:38:45 +0000
committerDavid Robillard <d@drobilla.net>2009-11-18 00:38:45 +0000
commit6ec390d53a3dbea90e7308c9e40e03266f5d5127 (patch)
tree964973527778b5b2b28f8a5ebf63057fb7651d36 /src/engine/PortImpl.cpp
parent1a725c0811fd15900464e1eff429c6ead90805d4 (diff)
downloadingen-6ec390d53a3dbea90e7308c9e40e03266f5d5127.tar.gz
ingen-6ec390d53a3dbea90e7308c9e40e03266f5d5127.tar.bz2
ingen-6ec390d53a3dbea90e7308c9e40e03266f5d5127.zip
Rename DataType to PortType (since that's what it really means).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2273 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/PortImpl.cpp')
-rw-r--r--src/engine/PortImpl.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp
index 169c7289..23f7b5f8 100644
--- a/src/engine/PortImpl.cpp
+++ b/src/engine/PortImpl.cpp
@@ -18,7 +18,7 @@
#include <iostream>
#include "raul/Array.hpp"
#include "raul/Maid.hpp"
-#include "interface/DataType.hpp"
+#include "interface/PortType.hpp"
#include "events/SendPortValue.hpp"
#include "events/SendPortActivity.hpp"
#include "AudioBuffer.hpp"
@@ -44,10 +44,10 @@ PortImpl::PortImpl(BufferFactory& bufs,
const string& name,
uint32_t index,
uint32_t poly,
- DataType type,
+ PortType type,
const Atom& value,
size_t buffer_size)
- : GraphObjectImpl(node, name, (type == DataType::AUDIO || type == DataType::CONTROL))
+ : GraphObjectImpl(node, name, (type == PortType::AUDIO || type == PortType::CONTROL))
, _bufs(bufs)
, _index(index)
, _poly(poly)
@@ -77,7 +77,7 @@ PortImpl::PortImpl(BufferFactory& bufs,
add_property("rdf:type", Atom(Atom::URI, type.uri()));
- if (type == DataType::EVENTS)
+ if (type == PortType::EVENTS)
_broadcast = true; // send activity blips
assert(_buffers->size() > 0);
@@ -96,7 +96,7 @@ PortImpl::~PortImpl()
bool
PortImpl::set_polyphonic(Maid& maid, bool p)
{
- if (_type == DataType::CONTROL || _type == DataType::AUDIO)
+ if (_type == PortType::CONTROL || _type == PortType::AUDIO)
return GraphObjectImpl::set_polyphonic(maid, p);
else
return (!p);
@@ -175,19 +175,19 @@ PortImpl::broadcast_value(Context& context, bool force)
{
Raul::Atom val;
switch (_type.symbol()) {
- case DataType::UNKNOWN:
+ case PortType::UNKNOWN:
break;
- case DataType::AUDIO:
- case DataType::CONTROL:
+ case PortType::AUDIO:
+ case PortType::CONTROL:
val = ((AudioBuffer*)buffer(0).get())->value_at(0);
break;
- case DataType::EVENTS:
+ case PortType::EVENTS:
if (((EventBuffer*)buffer(0).get())->event_count() > 0) {
const Events::SendPortActivity ev(context.engine(), context.start(), this);
context.event_sink().write(sizeof(ev), &ev);
}
break;
- case DataType::VALUE:
+ case PortType::VALUE:
LV2Object::to_atom(context.engine().world(), ((ObjectBuffer*)buffer(0).get())->object(), val);
break;
}