summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/PortImpl.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-01-25 06:55:57 +0000
committerDavid Robillard <d@drobilla.net>2008-01-25 06:55:57 +0000
commitdf8ee18c0139f889bf7c697713a2205364845464 (patch)
tree2d3d2389504676b194fcb47a9ed3e7b1da8f94c4 /src/libs/engine/PortImpl.hpp
parentf3f08e248a96f2a6d75d4fc6ee3dc34985805e58 (diff)
downloadingen-df8ee18c0139f889bf7c697713a2205364845464.tar.gz
ingen-df8ee18c0139f889bf7c697713a2205364845464.tar.bz2
ingen-df8ee18c0139f889bf7c697713a2205364845464.zip
Overhaul SLV2 API to return/take SLV2Value (instead of strings or primitives) wherever possible.
Make 'index' a fundemental property of ingen ports. git-svn-id: http://svn.drobilla.net/lad/ingen@1113 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/PortImpl.hpp')
-rw-r--r--src/libs/engine/PortImpl.hpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/libs/engine/PortImpl.hpp b/src/libs/engine/PortImpl.hpp
index 22e44c05..c2e2403d 100644
--- a/src/libs/engine/PortImpl.hpp
+++ b/src/libs/engine/PortImpl.hpp
@@ -27,7 +27,7 @@
#include "interface/DataType.hpp"
#include "Buffer.hpp"
-namespace Raul { class Maid; }
+namespace Raul { class Maid; class Atom; }
namespace Ingen {
@@ -68,7 +68,8 @@ public:
*/
virtual bool apply_poly(Raul::Maid& maid, uint32_t poly);
- virtual Raul::Atom value() const;
+ const Raul::Atom& value() const { return _value; }
+ void set_value(const Raul::Atom& v) { _value = v; }
inline Buffer* buffer(uint32_t voice) const {
Buffer* const buf = _buffers->at(voice);
@@ -87,11 +88,11 @@ public:
/** Empty buffer contents completely (ie silence) */
virtual void clear_buffers();
-
+
virtual bool is_input() const = 0;
virtual bool is_output() const = 0;
- uint32_t num() const { return _index; }
+ uint32_t index() const { return _index; }
uint32_t poly() const { return _poly; }
DataType type() const { return _type; }
size_t buffer_size() const { return _buffer_size; }
@@ -110,19 +111,21 @@ protected:
uint32_t index,
uint32_t poly,
DataType type,
+ const Raul::Atom& value,
size_t buffer_size);
virtual void allocate_buffers();
virtual void connect_buffers();
virtual void broadcast(ProcessContext& context);
- uint32_t _index;
- uint32_t _poly;
- uint32_t _buffer_size;
- DataType _type;
- bool _fixed_buffers;
- bool _broadcast;
- Sample _last_broadcasted_value;
+ uint32_t _index;
+ uint32_t _poly;
+ uint32_t _buffer_size;
+ DataType _type;
+ Raul::Atom _value;
+ bool _fixed_buffers;
+ bool _broadcast;
+ Sample _last_broadcasted_value;
Raul::Array<Buffer*>* _buffers;