From b1198f0842e6e4d6b1c01f07d91b42ef4a212788 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 12 Feb 2017 15:04:20 +0100 Subject: Use smart pointers to handle real-time memory disposal --- src/server/BlockImpl.hpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/server/BlockImpl.hpp') diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp index 8f937dc5..2e3e5fcd 100644 --- a/src/server/BlockImpl.hpp +++ b/src/server/BlockImpl.hpp @@ -60,6 +60,8 @@ class BlockImpl : public NodeImpl , public boost::intrusive::slist_base_hook<> // In GraphImpl { public: + typedef Raul::Array Ports; + BlockImpl(PluginImpl* plugin, const Raul::Symbol& symbol, bool poly, @@ -152,8 +154,7 @@ public: virtual void set_polyphonic(bool p) { _polyphonic = p; } virtual bool prepare_poly(BufferFactory& bufs, uint32_t poly); - virtual bool apply_poly( - RunContext& context, Raul::Maid& maid, uint32_t poly); + virtual bool apply_poly(RunContext& context, uint32_t poly); /** Information about the Plugin this Block is an instance of. * Not the best name - not all blocks come from plugins (ie Graph) @@ -186,15 +187,15 @@ public: protected: PortImpl* nth_port_by_type(uint32_t n, bool input, PortType type); - PluginImpl* _plugin; - Raul::Array* _ports; ///< Access in audio thread only - uint32_t _polyphony; - std::set _providers; ///< Blocks connected to this one's input ports - std::set _dependants; ///< Blocks this one's output ports are connected to - Mark _mark; ///< Mark for graph compilation algorithm - bool _polyphonic; - bool _activated; - bool _enabled; + PluginImpl* _plugin; + MPtr _ports; ///< Access in audio thread only + uint32_t _polyphony; + std::set _providers; ///< Blocks connected to this one's input ports + std::set _dependants; ///< Blocks this one's output ports are connected to + Mark _mark; ///< Mark for graph compilation algorithm + bool _polyphonic; + bool _activated; + bool _enabled; }; } // namespace Server -- cgit v1.2.1