summaryrefslogtreecommitdiffstats
path: root/src/server/PortImpl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/PortImpl.hpp')
-rw-r--r--src/server/PortImpl.hpp40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp
index d79bb6cd..64c3322f 100644
--- a/src/server/PortImpl.hpp
+++ b/src/server/PortImpl.hpp
@@ -22,12 +22,11 @@
#include "NodeImpl.hpp"
#include "PortType.hpp"
#include "RunContext.hpp"
+#include "server.h"
#include "types.hpp"
#include "ingen/Atom.hpp"
-#include "ingen/Node.hpp"
#include "ingen/URIs.hpp"
-#include "ingen/ingen.h"
#include "lv2/urid/urid.h"
#include "raul/Array.hpp"
#include "raul/Maid.hpp"
@@ -57,7 +56,7 @@ class BlockImpl;
*
* \ingroup engine
*/
-class INGEN_API PortImpl : public NodeImpl
+class INGEN_SERVER_API PortImpl : public NodeImpl
{
public:
struct SetState {
@@ -91,10 +90,8 @@ public:
};
struct Voice {
- Voice() : buffer(nullptr) {}
-
SetState set_state;
- BufferRef buffer;
+ BufferRef buffer{nullptr};
};
using Voices = raul::Array<Voice>;
@@ -147,10 +144,11 @@ public:
void set_minimum(const Atom& min) { _min.set_rt(min); }
void set_maximum(const Atom& max) { _max.set_rt(max); }
- inline BufferRef buffer(uint32_t voice) const {
+ BufferRef buffer(uint32_t voice) const {
return _voices->at((_poly == 1) ? 0 : voice).buffer;
}
- inline BufferRef prepared_buffer(uint32_t voice) const {
+
+ BufferRef prepared_buffer(uint32_t voice) const {
return _prepared_voices->at(voice).buffer;
}
@@ -207,7 +205,7 @@ public:
uint32_t index() const { return _index; }
void set_index(RunContext&, uint32_t index) { _index = index; }
- inline bool is_a(PortType type) const { return _type == type; }
+ bool is_a(PortType type) const { return _type == type; }
bool has_value() const;
@@ -299,9 +297,9 @@ protected:
uint32_t _index;
uint32_t _poly;
uint32_t _buffer_size;
- uint32_t _frames_since_monitor;
- float _monitor_value;
- float _peak;
+ uint32_t _frames_since_monitor{0};
+ float _monitor_value{0.0f};
+ float _peak{0.0f};
PortType _type;
LV2_URID _buffer_type;
Atom _value;
@@ -310,15 +308,15 @@ protected:
raul::managed_ptr<Voices> _voices;
raul::managed_ptr<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;
+ std::atomic_flag _connected_flag{false};
+ bool _monitored{false};
+ bool _force_monitor_update{false};
+ bool _is_morph{false};
+ bool _is_auto_morph{false};
+ bool _is_logarithmic{false};
+ bool _is_sample_rate{false};
+ bool _is_toggled{false};
+ bool _is_driver_port{false};
bool _is_output;
};