From 967a8b9d6690a5ece385d07af04c322d645de23f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 17 Dec 2017 23:46:20 +0100 Subject: Reduce port memory overhead --- src/server/PortImpl.hpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/server/PortImpl.hpp') 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; MPtr _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 -- cgit v1.2.1