diff options
author | David Robillard <d@drobilla.net> | 2008-07-29 05:50:52 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-07-29 05:50:52 +0000 |
commit | f0e920ab170569fc9eaf5858af2e9ae3e8d44993 (patch) | |
tree | 1e1fa0a7b2bfeb0e6ca4541c570f445fc4541ff0 /src/libs/engine/AudioBuffer.hpp | |
parent | de58b508b28a42b072fb26d2633aa0af37ee7c0e (diff) | |
download | ingen-f0e920ab170569fc9eaf5858af2e9ae3e8d44993.tar.gz ingen-f0e920ab170569fc9eaf5858af2e9ae3e8d44993.tar.bz2 ingen-f0e920ab170569fc9eaf5858af2e9ae3e8d44993.zip |
Fix stateful port value setting stuff (trigger output ports on note/trigger/etc modules now work correctly).
git-svn-id: http://svn.drobilla.net/lad/ingen@1302 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/AudioBuffer.hpp')
-rw-r--r-- | src/libs/engine/AudioBuffer.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libs/engine/AudioBuffer.hpp b/src/libs/engine/AudioBuffer.hpp index 44650856..513c188f 100644 --- a/src/libs/engine/AudioBuffer.hpp +++ b/src/libs/engine/AudioBuffer.hpp @@ -33,8 +33,8 @@ public: AudioBuffer(size_t capacity); void clear(); - void set(Sample val, size_t start_sample); - void set(Sample val, size_t start_sample, size_t end_sample); + void set_value(Sample val, FrameTime cycle_start, FrameTime time); + void set_block(Sample val, size_t start_offset, size_t end_offset); void scale(Sample val, size_t start_sample, size_t end_sample); void copy(const Buffer* src, size_t start_sample, size_t end_sample); void accumulate(const AudioBuffer* src, size_t start_sample, size_t end_sample); @@ -53,8 +53,8 @@ public: inline Sample& value_at(size_t offset) const { assert(offset < _size); return data()[offset]; } - void prepare_read(SampleCount nframes); - void prepare_write(SampleCount nframes) {} + void prepare_read(FrameTime start, SampleCount nframes); + void prepare_write(FrameTime start, SampleCount nframes) {} void rewind() const {} void resize(size_t size); @@ -75,6 +75,7 @@ private: size_t _filled_size; ///< Usable buffer size (for MIDI ports etc) State _state; ///< State of buffer for setting values next cycle Sample _set_value; ///< Value set by @ref set (may need to be set next cycle) + FrameTime _set_time; ///< Time _set_value was set (to reset next cycle) }; |