summaryrefslogtreecommitdiffstats
path: root/src/server/InputPort.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/InputPort.hpp')
-rw-r--r--src/server/InputPort.hpp49
1 files changed, 26 insertions, 23 deletions
diff --git a/src/server/InputPort.hpp b/src/server/InputPort.hpp
index 35ddb2b9..f3c6e553 100644
--- a/src/server/InputPort.hpp
+++ b/src/server/InputPort.hpp
@@ -19,11 +19,10 @@
#include "ArcImpl.hpp"
#include "PortImpl.hpp"
-#include "PortType.hpp"
#include "types.hpp"
-#include "ingen/types.hpp"
-#include "lv2/urid/urid.h"
+#include <lv2/urid/urid.h>
+#include <raul/Maid.hpp>
#include <boost/intrusive/options.hpp>
#include <boost/intrusive/slist.hpp>
@@ -31,10 +30,14 @@
#include <cstdint>
#include <cstdlib>
-namespace Raul { class Symbol; }
+namespace raul {
+class Symbol;
+} // namespace raul
namespace ingen {
+enum class PortType;
+
class Atom;
namespace server {
@@ -59,7 +62,7 @@ class InputPort : public PortImpl
public:
InputPort(BufferFactory& bufs,
BlockImpl* parent,
- const Raul::Symbol& symbol,
+ const raul::Symbol& symbol,
uint32_t index,
uint32_t poly,
PortType type,
@@ -72,9 +75,9 @@ public:
boost::intrusive::constant_time_size<true>>;
/** Return the maximum polyphony of an output connected to this input. */
- virtual uint32_t max_tail_poly(RunContext& context) const;
+ virtual uint32_t max_tail_poly(RunContext& ctx) const;
- bool apply_poly(RunContext& context, uint32_t poly) override;
+ bool apply_poly(RunContext& ctx, uint32_t poly) override;
/** Add an arc. Realtime safe.
*
@@ -83,7 +86,7 @@ public:
*
* setup_buffers() must be called later for the change to take effect.
*/
- void add_arc(RunContext& context, ArcImpl& c);
+ void add_arc(RunContext& ctx, ArcImpl& c);
/** Remove an arc. Realtime safe.
*
@@ -93,25 +96,25 @@ public:
/** Like `get_buffers`, but for the pre-process thread.
*
- * This uses the "current" number of arcs fromthe perspective of the
+ * This uses the "current" number of arcs from the perspective of the
* pre-process thread to allocate buffers for application of a
* connection/disconnection/etc in the next process cycle.
*/
- bool pre_get_buffers(BufferFactory& bufs,
- MPtr<Voices>& voices,
- uint32_t poly) const;
+ bool pre_get_buffers(BufferFactory& bufs,
+ raul::managed_ptr<Voices>& voices,
+ uint32_t poly) const;
bool
setup_buffers(RunContext& ctx, BufferFactory& bufs, uint32_t poly) override;
/** Set up buffer pointers. */
- void pre_process(RunContext& context) override;
+ void pre_process(RunContext& ctx) override;
/** Prepare buffer for access, mixing if necessary. */
- void pre_run(RunContext& context) override;
+ void pre_run(RunContext& ctx) override;
/** Prepare buffer for next process cycle. */
- void post_process(RunContext& context) override;
+ void post_process(RunContext& ctx) override;
SampleCount
next_value_offset(SampleCount offset, SampleCount end) const override;
@@ -123,14 +126,14 @@ public:
bool direct_connect() const;
protected:
- bool get_buffers(BufferFactory& bufs,
- PortImpl::GetFn get,
- const MPtr<Voices>& voices,
- uint32_t poly,
- size_t num_in_arcs) const override;
-
- size_t _num_arcs; ///< Pre-process thread
- Arcs _arcs; ///< Audio thread
+ bool get_buffers(BufferFactory& bufs,
+ PortImpl::GetFn get,
+ const raul::managed_ptr<Voices>& voices,
+ uint32_t poly,
+ size_t num_in_arcs) const override;
+
+ size_t _num_arcs{0}; ///< Pre-process thread
+ Arcs _arcs; ///< Audio thread
};
} // namespace server