summaryrefslogtreecommitdiffstats
path: root/src/server/PortImpl.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-31 04:34:18 +0000
committerDavid Robillard <d@drobilla.net>2012-07-31 04:34:18 +0000
commitd184de93fce861f4b632f410bde8d527ce1bf34f (patch)
tree9efa412f62028113381f66f8fe256d09fdeb6749 /src/server/PortImpl.hpp
parent66ac730782803a47ae4977d2db2407126005f4bd (diff)
downloadingen-d184de93fce861f4b632f410bde8d527ce1bf34f.tar.gz
ingen-d184de93fce861f4b632f410bde8d527ce1bf34f.tar.bz2
ingen-d184de93fce861f4b632f410bde8d527ce1bf34f.zip
Move continuous value setting stuff from AudioBuffer to PortImpl.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4582 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/PortImpl.hpp')
-rw-r--r--src/server/PortImpl.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp
index 459c1858..f4a8975b 100644
--- a/src/server/PortImpl.hpp
+++ b/src/server/PortImpl.hpp
@@ -98,6 +98,15 @@ public:
return _prepared_buffers->at(voice);
}
+ void update_set_state(Context& context, uint32_t voice);
+
+ void set_voice_value(Context& context,
+ uint32_t voice,
+ FrameTime time,
+ Sample value);
+
+ void set_control_value(Context& context, FrameTime time, Sample value);
+
/** Called once per process cycle */
virtual void pre_process(Context& context) = 0;
virtual void post_process(Context& context) = 0;
@@ -175,6 +184,16 @@ protected:
const Raul::Atom& value,
size_t buffer_size);
+ struct SetState {
+ enum State { SET, HALF_SET_CYCLE_1, HALF_SET_CYCLE_2 };
+
+ SetState() : state(SET), value(0), time(0) {}
+
+ State state; ///< State of buffer for setting control value
+ Sample value; ///< Value currently being set
+ FrameTime time; ///< Time value was set
+ };
+
BufferFactory& _bufs;
uint32_t _index;
uint32_t _poly;
@@ -185,6 +204,8 @@ protected:
Raul::Atom _min;
Raul::Atom _max;
Raul::Atom _last_broadcasted_value;
+ Raul::Array<SetState>* _set_states;
+ Raul::Array<SetState>* _prepared_set_states;
Raul::Array<BufferRef>* _buffers;
Raul::Array<BufferRef>* _prepared_buffers;
bool _broadcast;