diff options
author | David Robillard <d@drobilla.net> | 2007-10-13 20:35:29 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-13 20:35:29 +0000 |
commit | cf63c971c2a8ee8cc2ddcddb52ce8135cd29619b (patch) | |
tree | caea057e24a2d498b8fc88a44867891e1ec3766c /src/libs/engine/AudioBuffer.hpp | |
parent | 4d440f54870cd3934a49bab1ae98fad3f13f00d4 (diff) | |
download | ingen-cf63c971c2a8ee8cc2ddcddb52ce8135cd29619b.tar.gz ingen-cf63c971c2a8ee8cc2ddcddb52ce8135cd29619b.tar.bz2 ingen-cf63c971c2a8ee8cc2ddcddb52ce8135cd29619b.zip |
Fix sub-patch MIDI I/O.
Make buffer 'joining' (zero-copy connections) significantly less retarded.
git-svn-id: http://svn.drobilla.net/lad/ingen@882 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, 3 insertions, 6 deletions
diff --git a/src/libs/engine/AudioBuffer.hpp b/src/libs/engine/AudioBuffer.hpp index de9fc4a6..44650856 100644 --- a/src/libs/engine/AudioBuffer.hpp +++ b/src/libs/engine/AudioBuffer.hpp @@ -41,16 +41,14 @@ public: bool join(Buffer* buf); void unjoin(); - bool is_joined_to(Buffer* buf) const; /** For driver use only!! */ void set_data(Sample* data); - inline void* raw_data() const - { return ((_joined_buf != NULL) ? _joined_buf->raw_data() : _data); } + inline const void* raw_data() const { return _data; } + inline void* raw_data() { return _data; } - inline Sample* data() const - { return ((_joined_buf != NULL) ? _joined_buf->data() : _data); } + inline Sample* data() const { return _data; } inline Sample& value_at(size_t offset) const { assert(offset < _size); return data()[offset]; } @@ -73,7 +71,6 @@ private: Sample* _data; ///< Used data pointer (probably same as _local_data) Sample* _local_data; ///< Locally allocated buffer (possibly unused if joined or set_data used) - AudioBuffer* _joined_buf; ///< Buffer to mirror, if joined size_t _size; ///< Allocated buffer size size_t _filled_size; ///< Usable buffer size (for MIDI ports etc) State _state; ///< State of buffer for setting values next cycle |