From cf63c971c2a8ee8cc2ddcddb52ce8135cd29619b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 13 Oct 2007 20:35:29 +0000 Subject: 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 --- src/libs/engine/AudioBuffer.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/libs/engine/AudioBuffer.hpp') 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 -- cgit v1.2.1