diff options
author | David Robillard <d@drobilla.net> | 2017-12-17 23:46:20 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-01-12 18:20:04 +0100 |
commit | 967a8b9d6690a5ece385d07af04c322d645de23f (patch) | |
tree | ade394d2a4b23c0007b58b6ab86d2427711f8bf5 /src/server/PortImpl.hpp | |
parent | 79fe75853ed8205674335f88e4e9c0e9dec137f9 (diff) | |
download | ingen-967a8b9d6690a5ece385d07af04c322d645de23f.tar.gz ingen-967a8b9d6690a5ece385d07af04c322d645de23f.tar.bz2 ingen-967a8b9d6690a5ece385d07af04c322d645de23f.zip |
Reduce port memory overhead
Diffstat (limited to 'src/server/PortImpl.hpp')
-rw-r--r-- | src/server/PortImpl.hpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp index d9b81a16..aa58cfdb 100644 --- a/src/server/PortImpl.hpp +++ b/src/server/PortImpl.hpp @@ -125,15 +125,15 @@ public: const Atom& value() const { return _value; } void set_value(const Atom& v) { _value = v; } - const Atom& minimum() const { return _min; } - const Atom& maximum() const { return _max; } + float minimum() const { return _min; } + float maximum() const { return _max; } /* The following two methods store the range in variables so it can be accessed in the process thread, which is required for applying control bindings from incoming MIDI data. */ - void set_minimum(const Atom& min) { _min.set_rt(min); } - void set_maximum(const Atom& max) { _max.set_rt(max); } + void set_minimum(float min) { _min = min; } + void set_maximum(float max) { _max = max; } inline BufferRef buffer(uint32_t voice) const { return _voices->at((_poly == 1) ? 0 : voice).buffer; @@ -289,21 +289,21 @@ protected: PortType _type; LV2_URID _buffer_type; Atom _value; - Atom _min; - Atom _max; + float _min; + float _max; MPtr<Voices> _voices; MPtr<Voices> _prepared_voices; BufferRef _user_buffer; std::atomic_flag _connected_flag; - bool _monitored; - bool _force_monitor_update; - bool _is_morph; - bool _is_auto_morph; - bool _is_logarithmic; - bool _is_sample_rate; - bool _is_toggled; - bool _is_driver_port; - bool _is_output; + bool _monitored : 1; + bool _force_monitor_update : 1; + bool _is_morph : 1; + bool _is_auto_morph : 1; + bool _is_logarithmic : 1; + bool _is_sample_rate : 1; + bool _is_toggled : 1; + bool _is_driver_port : 1; + bool _is_output : 1; }; } // namespace server |