diff options
author | David Robillard <d@drobilla.net> | 2022-08-18 02:04:21 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-18 02:04:21 -0400 |
commit | 9994cdebb60ecffcf81ced46ccfd12968ea3b2da (patch) | |
tree | eddf1322d05e407fa3b683fca25a6a150427ddba | |
parent | c8152e8724c8e78fc53651f000a4e63aca945722 (diff) | |
download | ingen-9994cdebb60ecffcf81ced46ccfd12968ea3b2da.tar.gz ingen-9994cdebb60ecffcf81ced46ccfd12968ea3b2da.tar.bz2 ingen-9994cdebb60ecffcf81ced46ccfd12968ea3b2da.zip |
Use consistent spacing for line comments
47 files changed, 103 insertions, 99 deletions
diff --git a/include/ingen/AtomForge.hpp b/include/ingen/AtomForge.hpp index 29e890c1..81f36b5b 100644 --- a/include/ingen/AtomForge.hpp +++ b/include/ingen/AtomForge.hpp @@ -121,6 +121,6 @@ private: AtomPtr _buf; ///< Atom buffer }; -} // namespace ingen +} // namespace ingen -#endif // INGEN_ATOMFORGE_HPP +#endif // INGEN_ATOMFORGE_HPP diff --git a/include/ingen/ColorContext.hpp b/include/ingen/ColorContext.hpp index ea2303d2..f33b7e2c 100644 --- a/include/ingen/ColorContext.hpp +++ b/include/ingen/ColorContext.hpp @@ -35,6 +35,6 @@ private: FILE* _stream; }; -} // namespace ingen +} // namespace ingen -#endif // INGEN_COLORCONTEXT_HPP +#endif // INGEN_COLORCONTEXT_HPP diff --git a/include/ingen/Configuration.hpp b/include/ingen/Configuration.hpp index c27a5063..3ab5c27b 100644 --- a/include/ingen/Configuration.hpp +++ b/include/ingen/Configuration.hpp @@ -47,9 +47,9 @@ public: * This controls when and where an option will be saved or restored. */ enum Scope { - GLOBAL = 1, ///< Applies to any Ingen instance - SESSION = 1<<1, ///< Applies to this Ingen instance only - GUI = 1<<2 ///< Persistent GUI settings saved at exit + GLOBAL = 1, ///< Applies to any Ingen instance + SESSION = 1 << 1, ///< Applies to this Ingen instance only + GUI = 1 << 2 ///< Persistent GUI settings saved at exit }; /** Add a configuration option. diff --git a/include/ingen/Log.hpp b/include/ingen/Log.hpp index c8679087..8d1b420c 100644 --- a/include/ingen/Log.hpp +++ b/include/ingen/Log.hpp @@ -106,4 +106,4 @@ private: } // namespace ingen -#endif // INGEN_LOG_HPP +#endif // INGEN_LOG_HPP diff --git a/include/ingen/Message.hpp b/include/ingen/Message.hpp index 6731ed67..ca618514 100644 --- a/include/ingen/Message.hpp +++ b/include/ingen/Message.hpp @@ -138,6 +138,6 @@ using Message = boost::variant<BundleBegin, SetProperty, Undo>; -} // namespace ingen +} // namespace ingen -#endif // INGEN_MESSAGE_HPP +#endif // INGEN_MESSAGE_HPP diff --git a/include/ingen/Node.hpp b/include/ingen/Node.hpp index 3733b51e..412dd64a 100644 --- a/include/ingen/Node.hpp +++ b/include/ingen/Node.hpp @@ -98,7 +98,7 @@ protected: : Resource(uris, path_to_uri(path)) {} - Arcs _arcs; ///< Graphs only + Arcs _arcs; ///< Graphs only }; } // namespace ingen diff --git a/include/ingen/Parser.hpp b/include/ingen/Parser.hpp index c309eeff..599b8953 100644 --- a/include/ingen/Parser.hpp +++ b/include/ingen/Parser.hpp @@ -61,8 +61,8 @@ public: return uri < r.uri; } - URI uri; ///< URI of resource (e.g. a Graph) - FilePath filename; ///< Path of describing file (seeAlso) + URI uri; ///< URI of resource (e.g. a Graph) + FilePath filename; ///< Path of describing file (seeAlso) }; /** Find all resources of a given type listed in a manifest file. */ diff --git a/include/ingen/SocketReader.hpp b/include/ingen/SocketReader.hpp index 4d0d1fdd..5e7bc373 100644 --- a/include/ingen/SocketReader.hpp +++ b/include/ingen/SocketReader.hpp @@ -83,6 +83,6 @@ private: std::thread _thread; }; -} // namespace ingen +} // namespace ingen -#endif // INGEN_SOCKETREADER_HPP +#endif // INGEN_SOCKETREADER_HPP diff --git a/include/ingen/SocketWriter.hpp b/include/ingen/SocketWriter.hpp index a0896ad9..7edaa13c 100644 --- a/include/ingen/SocketWriter.hpp +++ b/include/ingen/SocketWriter.hpp @@ -52,6 +52,6 @@ protected: std::shared_ptr<raul::Socket> _socket; }; -} // namespace ingen +} // namespace ingen -#endif // INGEN_SOCKETWRITER_HPP +#endif // INGEN_SOCKETWRITER_HPP diff --git a/include/ingen/StreamWriter.hpp b/include/ingen/StreamWriter.hpp index 620497f8..9fafe571 100644 --- a/include/ingen/StreamWriter.hpp +++ b/include/ingen/StreamWriter.hpp @@ -47,6 +47,6 @@ protected: ColorContext::Color _color; }; -} // namespace ingen +} // namespace ingen -#endif // INGEN_STREAMWRITER_HPP +#endif // INGEN_STREAMWRITER_HPP diff --git a/include/ingen/TurtleWriter.hpp b/include/ingen/TurtleWriter.hpp index b3d9f658..780d9f7b 100644 --- a/include/ingen/TurtleWriter.hpp +++ b/include/ingen/TurtleWriter.hpp @@ -64,6 +64,6 @@ protected: bool _wrote_prefixes{false}; }; -} // namespace ingen +} // namespace ingen -#endif // INGEN_TURTLEWRITER_HPP +#endif // INGEN_TURTLEWRITER_HPP diff --git a/include/ingen/URI.hpp b/include/ingen/URI.hpp index b8108224..ea57edca 100644 --- a/include/ingen/URI.hpp +++ b/include/ingen/URI.hpp @@ -173,4 +173,4 @@ operator<<(std::basic_ostream<Char, Traits>& os, const URI& uri) } // namespace ingen -#endif // INGEN_URI_HPP +#endif // INGEN_URI_HPP diff --git a/include/ingen/World.hpp b/include/ingen/World.hpp index 5c8f1f72..8c1bef12 100644 --- a/include/ingen/World.hpp +++ b/include/ingen/World.hpp @@ -151,6 +151,6 @@ private: Impl* _impl; }; -} // namespace ingen +} // namespace ingen -#endif // INGEN_WORLD_HPP +#endif // INGEN_WORLD_HPP diff --git a/include/ingen/client/PluginUI.hpp b/include/ingen/client/PluginUI.hpp index 6e7ea73f..b291d521 100644 --- a/include/ingen/client/PluginUI.hpp +++ b/include/ingen/client/PluginUI.hpp @@ -82,11 +82,12 @@ public: * The application must connect to this signal to communicate with the * engine and/or update itself as necessary. */ - INGEN_SIGNAL(property_changed, void, - const URI&, // Subject - const URI&, // Predicate - const Atom&, // Object - Resource::Graph) // Context + INGEN_SIGNAL(property_changed, + void, + const URI&, // Subject + const URI&, // Predicate + const Atom&, // Object + Resource::Graph) // Context ingen::World& world() const { return _world; } std::shared_ptr<const BlockModel> block() const { return _block; } diff --git a/include/ingen/client/SocketClient.hpp b/include/ingen/client/SocketClient.hpp index 0c823df5..0002c795 100644 --- a/include/ingen/client/SocketClient.hpp +++ b/include/ingen/client/SocketClient.hpp @@ -86,7 +86,7 @@ private: SocketReader _reader; }; -} // namespace client -} // namespace ingen +} // namespace client +} // namespace ingen -#endif // INGEN_CLIENT_SOCKET_CLIENT_HPP +#endif // INGEN_CLIENT_SOCKET_CLIENT_HPP diff --git a/src/ColorContext.cpp b/src/ColorContext.cpp index 827395f2..a4e60ca5 100644 --- a/src/ColorContext.cpp +++ b/src/ColorContext.cpp @@ -41,4 +41,4 @@ ColorContext::~ColorContext() } } -} // namespace ingen +} // namespace ingen diff --git a/src/Configuration.cpp b/src/Configuration.cpp index 794cf193..5af9fea1 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -193,9 +193,9 @@ Configuration::parse(int argc, char** argv) if (o->second.type == _forge.Bool) { // --flag o->second.value = _forge.make(true); - } else if (equals) { // --opt=val + } else if (equals) { // --opt=val set_value_from_string(o->second, equals + 1); - } else if (++i < argc) { // --opt val + } else if (++i < argc) { // --opt val set_value_from_string(o->second, argv[i]); } else { throw OptionError(fmt("Missing value for `%1%'", name)); @@ -211,15 +211,15 @@ Configuration::parse(int argc, char** argv) } const auto o = _options.find(n->second); - if (j < len - 1) { // Non-final POSIX style flag + if (j < len - 1) { // Non-final POSIX style flag if (o->second.type != _forge.Bool) { throw OptionError( fmt("Missing value for `%1%'", letter)); } o->second.value = _forge.make(true); - } else if (o->second.type == _forge.Bool) { // -f + } else if (o->second.type == _forge.Bool) { // -f o->second.value = _forge.make(true); - } else if (++i < argc) { // -v val + } else if (++i < argc) { // -v val set_value_from_string(o->second, argv[i]); } else { throw OptionError(fmt("Missing value for `%1%'", letter)); diff --git a/src/Log.cpp b/src/Log.cpp index b52f470c..bc11fe3d 100644 --- a/src/Log.cpp +++ b/src/Log.cpp @@ -165,4 +165,4 @@ Log::Feature::feature(World& world, Node* block) return std::shared_ptr<LV2_Feature>(f, &free_log_feature); } -} // namespace ingen +} // namespace ingen diff --git a/src/Parser.cpp b/src/Parser.cpp index dec0e28c..6e0ee7a1 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -195,7 +195,7 @@ get_port(ingen::World& world, const raul::Symbol port_sym(sym); const raul::Path port_path(parent.child(port_sym)); - props.erase(uris.lv2_symbol); // Don't set symbol property in engine + props.erase(uris.lv2_symbol); // Don't set symbol property in engine return make_pair(port_path, props); } @@ -381,7 +381,7 @@ parse_graph(ingen::World& world, } if (ctx != Resource::Graph::INTERNAL) { - return {graph_path}; // Not parsing graph internals, finished now + return {graph_path}; // Not parsing graph internals, finished now } // For each block in this graph diff --git a/src/SocketReader.cpp b/src/SocketReader.cpp index c7b64166..83854bf9 100644 --- a/src/SocketReader.cpp +++ b/src/SocketReader.cpp @@ -166,11 +166,11 @@ SocketReader::run() const int ret = poll(&pfd, 1, -1); if (ret == -1 || (pfd.revents & (POLLERR|POLLHUP|POLLNVAL))) { on_hangup(); - break; // Hangup + break; // Hangup } if (!ret) { - continue; // No data, shouldn't happen + continue; // No data, shouldn't happen } // Lock RDF world @@ -179,7 +179,7 @@ SocketReader::run() // Read until the next '.' SerdStatus st = serd_reader_read_chunk(reader); if (st == SERD_FAILURE || !_msg_node) { - continue; // Read nothing, e.g. just whitespace + continue; // Read nothing, e.g. just whitespace } if (st) { @@ -210,4 +210,4 @@ SocketReader::run() _socket.reset(); } -} // namespace ingen +} // namespace ingen diff --git a/src/URI.cpp b/src/URI.cpp index fb562410..339ca07c 100644 --- a/src/URI.cpp +++ b/src/URI.cpp @@ -128,4 +128,4 @@ URI::make_relative(const URI& base) const return URI(node, uri); } -} // namespace ingen +} // namespace ingen diff --git a/src/client/GraphModel.cpp b/src/client/GraphModel.cpp index 7829a241..2fed1fb3 100644 --- a/src/client/GraphModel.cpp +++ b/src/client/GraphModel.cpp @@ -85,7 +85,7 @@ GraphModel::remove_arcs_on(const std::shared_ptr<PortModel>& p) || arc->head_path().parent() == p->path() || arc->head_path() == p->path()) { _signal_removed_arc.emit(arc); - _arcs.erase(j); // Cuts our reference + _arcs.erase(j); // Cuts our reference } j = next; } diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp index 2b598e2c..306846ee 100644 --- a/src/client/PluginModel.cpp +++ b/src/client/PluginModel.cpp @@ -49,7 +49,7 @@ PluginModel::PluginModel(URIs& uris, if (uri.string().find("ingen-internals") != string::npos) { _type = uris.ingen_Internal.urid_atom(); } else { - _type = uris.lv2_Plugin.urid_atom(); // Assume LV2 and hope for the best... + _type = uris.lv2_Plugin.urid_atom(); // Assume LV2 and hope for the best... } } diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index a0a966a3..031caceb 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -78,7 +78,7 @@ lv2_ui_write(SuilController controller, const float value = *static_cast<const float*>(buffer); if (port->value().type() == uris.atom_Float && value == port->value().get<float>()) { - return; // Ignore feedback + return; // Ignore feedback } ui->signal_property_changed()( diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index a14d9971..3acd510d 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -479,7 +479,7 @@ GraphCanvas::disconnection(const std::shared_ptr<const ArcModel>& arc) if (arc->head()->is_a(_app.uris().lv2_AudioPort)) { auto* const h = dynamic_cast<gui::Port*>(head); if (h) { - h->activity(_app.forge().make(0.0f)); // Reset peaks + h->activity(_app.forge().make(0.0f)); // Reset peaks } } } else { diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 6905318a..1b090c4f 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -127,7 +127,7 @@ bool NodeModule::idle_init() { if (_block->ports().empty()) { - return true; // Need to embed GUI, but ports haven't shown up yet + return true; // Need to embed GUI, but ports haven't shown up yet } // Ports have arrived, embed GUI and deregister this callback diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index e4e02aa6..84fbd165 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -223,11 +223,11 @@ Port::on_value_changed(double value) const URIs& uris = _app.uris(); const Atom& current_value = model()->value(); if (current_value.type() != uris.forge.Float) { - return; // Non-float, unsupported + return; // Non-float, unsupported } if (current_value.get<float>() == static_cast<float>(value)) { - return; // No change + return; // No change } const Atom atom = _app.forge().make(float(value)); diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp index ee6b5786..81474126 100644 --- a/src/server/BlockImpl.cpp +++ b/src/server/BlockImpl.cpp @@ -206,7 +206,7 @@ BlockImpl::bypass(RunContext& ctx) PortImpl* in = nth_port_by_type(i, true, t); PortImpl* out = nth_port_by_type(i, false, t); if (!out) { - break; // Finished writing all outputs + break; // Finished writing all outputs } if (in) { diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp index 448ebb99..ed3566aa 100644 --- a/src/server/BlockImpl.hpp +++ b/src/server/BlockImpl.hpp @@ -62,7 +62,7 @@ class Worker; * \ingroup engine */ class BlockImpl : public NodeImpl - , public boost::intrusive::slist_base_hook<> // In GraphImpl + , public boost::intrusive::slist_base_hook<> // In GraphImpl { public: using Ports = raul::Array<PortImpl*>; diff --git a/src/server/Buffer.cpp b/src/server/Buffer.cpp index 426cdb27..f561871f 100644 --- a/src/server/Buffer.cpp +++ b/src/server/Buffer.cpp @@ -217,7 +217,7 @@ Buffer::port_data(PortType port_type, SampleCount offset) const static inline __m128 mm_abs_ps(__m128 x) { - const __m128 sign_mask = _mm_set1_ps(-0.0f); // -0.0f = 1 << 31 + const __m128 sign_mask = _mm_set1_ps(-0.0f); // -0.0f = 1 << 31 return _mm_andnot_ps(sign_mask, x); } #endif @@ -299,7 +299,7 @@ Buffer::append_event(int64_t frames, auto* atom = get<LV2_Atom>(); if (atom->type == _factory.uris().atom_Chunk) { - clear(); // Chunk initialized with prepare_output_write(), clear + clear(); // Chunk initialized with prepare_output_write(), clear } if (sizeof(LV2_Atom) + atom->size + lv2_atom_pad_size(size) > _capacity) { @@ -339,14 +339,14 @@ Buffer::append_event_buffer(const Buffer* buf) reinterpret_cast<const LV2_Atom_Sequence*>(buf->get<LV2_Atom>()); if (seq->atom.type == _factory.uris().atom_Chunk) { - clear(); // Chunk initialized with prepare_output_write(), clear + clear(); // Chunk initialized with prepare_output_write(), clear } const uint32_t total_size = lv2_atom_total_size(&seq->atom); uint8_t* const end = reinterpret_cast<uint8_t*>(seq) + total_size; const uint32_t n_bytes = bseq->atom.size - sizeof(bseq->body); if (sizeof(LV2_Atom) + total_size + n_bytes >= _capacity) { - return false; // Not enough space + return false; // Not enough space } memcpy(end, bseq + 1, n_bytes); diff --git a/src/server/CompiledGraph.hpp b/src/server/CompiledGraph.hpp index 8c2bb815..f33941aa 100644 --- a/src/server/CompiledGraph.hpp +++ b/src/server/CompiledGraph.hpp @@ -49,7 +49,7 @@ public: void run(RunContext& ctx); private: - friend class raul::Maid; ///< Allow make_managed to construct + friend class raul::Maid; ///< Allow make_managed to construct CompiledGraph(GraphImpl* graph); diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index ecbdf8cf..aefc8608 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -414,7 +414,7 @@ ControlBindings::pre_process(RunContext& ctx, Buffer* buffer) _feedback->clear(); if ((!_learn_binding && _bindings->empty()) || !buffer->get<LV2_Atom>()) { - return; // Don't bother reading input + return; // Don't bother reading input } auto* seq = buffer->get<LV2_Atom_Sequence>(); @@ -424,7 +424,7 @@ ControlBindings::pre_process(RunContext& ctx, Buffer* buffer) const Key key = midi_event_key(ev->body.size, buf, value); if (_learn_binding && !!key) { - finish_learn(ctx, key); // Learn new binding + finish_learn(ctx, key); // Learn new binding } // Set all controls bound to this key diff --git a/src/server/GraphImpl.hpp b/src/server/GraphImpl.hpp index 185b858c..3746961a 100644 --- a/src/server/GraphImpl.hpp +++ b/src/server/GraphImpl.hpp @@ -204,14 +204,16 @@ public: Engine& engine() { return _engine; } private: - Engine& _engine; - uint32_t _poly_pre; ///< Pre-process thread only - uint32_t _poly_process; ///< Process thread only - raul::managed_ptr<CompiledGraph> _compiled_graph; ///< Process thread only - PortList _inputs; ///< Pre-process thread only - PortList _outputs; ///< Pre-process thread only - Blocks _blocks; ///< Pre-process thread only - bool _process{false}; ///< True iff graph is enabled + using CompiledGraphPtr = raul::managed_ptr<CompiledGraph>; + + Engine& _engine; + uint32_t _poly_pre; ///< Pre-process thread only + uint32_t _poly_process; ///< Process thread only + CompiledGraphPtr _compiled_graph; ///< Process thread only + PortList _inputs; ///< Pre-process thread only + PortList _outputs; ///< Pre-process thread only + Blocks _blocks; ///< Pre-process thread only + bool _process{false}; ///< True iff graph is enabled }; } // namespace server diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index f5012c81..68613e65 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -42,7 +42,7 @@ namespace ingen { namespace server { -static const uint32_t monitor_rate = 25.0; // Hz +static const uint32_t monitor_rate = 25.0; // Hz /** The length of time between monitor updates in frames */ static inline uint32_t diff --git a/src/server/PostProcessor.cpp b/src/server/PostProcessor.cpp index 88df994c..0e94efea 100644 --- a/src/server/PostProcessor.cpp +++ b/src/server/PostProcessor.cpp @@ -99,7 +99,7 @@ PostProcessor::process() // Post-process event ev->post_process(); - next = ev->next(); // [1] (see below) + next = ev->next(); // [1] (see below) } while (next && next->time() < end_time); /* Reached the tail (as far as we're concerned). There may be successors diff --git a/src/server/PreProcessor.cpp b/src/server/PreProcessor.cpp index beba06e2..7746d1db 100644 --- a/src/server/PreProcessor.cpp +++ b/src/server/PreProcessor.cpp @@ -109,14 +109,14 @@ PreProcessor::process(RunContext& ctx, PostProcessor& dest, size_t limit) } if (_block_state == BlockState::BLOCKED) { - break; // Waiting for PRE_UNBLOCKED + break; // Waiting for PRE_UNBLOCKED } if (ev->time() < ctx.start()) { - ev->set_time(ctx.start()); // Too late, nudge to context start + ev->set_time(ctx.start()); // Too late, nudge to context start } else if (_block_state != BlockState::PROCESSING && ev->time() >= ctx.end()) { - break; // Event is for a future cycle + break; // Event is for a future cycle } // Execute event diff --git a/src/server/PreProcessor.hpp b/src/server/PreProcessor.hpp index 832b545e..ff0b5fff 100644 --- a/src/server/PreProcessor.hpp +++ b/src/server/PreProcessor.hpp @@ -61,11 +61,11 @@ protected: private: enum class BlockState { - UNBLOCKED, ///< Normal, unblocked execution - PRE_BLOCKED, ///< Preprocess thread has enqueued blocking event - BLOCKED, ///< Process thread has reached blocking event - PRE_UNBLOCKED, ///< Preprocess thread has enqueued unblocking event - PROCESSING ///< Process thread is executing all events in-between + UNBLOCKED, ///< Normal, unblocked execution + PRE_BLOCKED, ///< Preprocess thread has enqueued blocking event + BLOCKED, ///< Process thread has reached blocking event + PRE_UNBLOCKED, ///< Preprocess thread has enqueued unblocking event + PROCESSING ///< Process thread is executing all events in-between }; void wait_for_block_state(const BlockState state) { diff --git a/src/server/SocketListener.cpp b/src/server/SocketListener.cpp index 640d575f..0d377732 100644 --- a/src/server/SocketListener.cpp +++ b/src/server/SocketListener.cpp @@ -141,7 +141,7 @@ ingen_listen(Engine* engine, raul::Socket* unix_sock, raul::Socket* net_sock) } if (unix_sock->fd() == -1 && net_sock->fd() == -1) { - return; // No sockets to listen to, exit thread + return; // No sockets to listen to, exit thread } struct pollfd pfds[2]; diff --git a/src/server/SocketServer.hpp b/src/server/SocketServer.hpp index ac8aa611..0531c44c 100644 --- a/src/server/SocketServer.hpp +++ b/src/server/SocketServer.hpp @@ -89,4 +89,4 @@ private: } // namespace server } // namespace ingen -#endif // INGEN_SERVER_SOCKET_SERVER_HPP +#endif // INGEN_SERVER_SOCKET_SERVER_HPP diff --git a/src/server/Task.cpp b/src/server/Task.cpp index ec9568b3..43db78e8 100644 --- a/src/server/Task.cpp +++ b/src/server/Task.cpp @@ -93,7 +93,7 @@ Task::get_task(RunContext& ctx) } if (_done_end >= _children.size()) { - return nullptr; // All child tasks are finished + return nullptr; // All child tasks are finished } // All child tasks claimed, but some are unfinished, steal a task diff --git a/src/server/Task.hpp b/src/server/Task.hpp index 83782098..b4e9848c 100644 --- a/src/server/Task.hpp +++ b/src/server/Task.hpp @@ -36,9 +36,9 @@ class Task { public: enum class Mode { - SINGLE, ///< Single block to run - SEQUENTIAL, ///< Elements must be run sequentially in order - PARALLEL ///< Elements may be run in any order in parallel + SINGLE, ///< Single block to run + SEQUENTIAL, ///< Elements must be run sequentially in order + PARALLEL ///< Elements may be run in any order in parallel }; Task(Mode mode, BlockImpl* block = nullptr) diff --git a/src/server/Worker.cpp b/src/server/Worker.cpp index bb282365..2da96ae6 100644 --- a/src/server/Worker.cpp +++ b/src/server/Worker.cpp @@ -36,8 +36,9 @@ namespace server { /// A message in the Worker::_requests ring struct MessageHeader { - LV2Block* block; ///< Node this message is from + LV2Block* block; ///< Node this message is from uint32_t size; ///< Size of following data + // `size' bytes of data follow here }; diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 67319423..71d4b48f 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -246,7 +246,7 @@ Delta::pre_process(PreProcessContext& ctx) } if (_create_event) { if (_create_event->pre_process(ctx)) { - _object = _engine.store()->get(path); // Get object for setting + _object = _engine.store()->get(path); // Get object for setting } else { return Event::pre_process_done(Status::CREATION_FAILED, _subject); } @@ -358,7 +358,7 @@ Delta::pre_process(PreProcessContext& ctx) } } else if ((block = dynamic_cast<BlockImpl*>(_object))) { if (key == uris.midi_binding && value == uris.patch_wildcard) { - op = SpecialType::CONTROL_BINDING; // Internal block learn + op = SpecialType::CONTROL_BINDING; // Internal block learn } else if (key == uris.ingen_enabled) { if (value.type() == uris.forge.Bool) { op = SpecialType::ENABLE; @@ -599,13 +599,13 @@ Delta::post_process() if (_create_event) { _create_event->post_process(); if (_create_event->status() != Status::SUCCESS) { - return; // Creation failed, nothing else to do + return; // Creation failed, nothing else to do } } for (auto& s : _set_events) { if (s->synthetic() || s->status() != Status::SUCCESS) { - s->post_process(); // Set failed, report error + s->post_process(); // Set failed, report error } } diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index 8d8a2b75..851a83fb 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -146,7 +146,7 @@ public: lv2_atom_total_size( static_cast<LV2_Atom*>(lv2_buf))); - if (graph_port->symbol() == "control") { // TODO: Safe to use index? + if (graph_port->symbol() == "control") { // TODO: Safe to use index? auto* seq = reinterpret_cast<LV2_Atom_Sequence*>(lv2_buf); bool enqueued = false; @@ -360,14 +360,14 @@ public: if (seq->atom.size + lv2_atom_pad_size( sizeof(LV2_Atom_Event) + atom.size) > _notify_capacity) { - break; // Output port buffer full, resume next time + break; // Output port buffer full, resume next time } auto* ev = reinterpret_cast<LV2_Atom_Event*>( reinterpret_cast<uint8_t*>(seq) + lv2_atom_total_size(&seq->atom)); - ev->time.frames = 0; // TODO: Time? + ev->time.frames = 0; // TODO: Time? ev->body = atom; _to_ui.skip(sizeof(LV2_Atom)); diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp index ea5019a8..976e43f9 100644 --- a/src/server/internals/Note.cpp +++ b/src/server/internals/Note.cpp @@ -359,7 +359,7 @@ NoteNode::free_voice(RunContext& ctx, uint32_t voice, FrameTime time) } } - if (replace_key != nullptr) { // Found a key to assign to freed voice + if (replace_key != nullptr) { // Found a key to assign to freed voice assert(&_keys[replace_key_num] == replace_key); assert(replace_key->state == Key::State::ON_UNASSIGNED); diff --git a/src/server/internals/Note.hpp b/src/server/internals/Note.hpp index 082a852c..3aa3217e 100644 --- a/src/server/internals/Note.hpp +++ b/src/server/internals/Note.hpp @@ -105,7 +105,7 @@ private: raul::managed_ptr<Voices> _prepared_voices; Key _keys[128]; - bool _sustain{false}; ///< Whether or not hold pedal is depressed + bool _sustain{false}; ///< Whether or not hold pedal is depressed InputPort* _midi_in_port; OutputPort* _freq_port; diff --git a/src/server/mix.cpp b/src/server/mix.cpp index a1e0c276..9c578d11 100644 --- a/src/server/mix.cpp +++ b/src/server/mix.cpp @@ -59,15 +59,15 @@ mix(const RunContext& ctx, const SampleCount end = ctx.nframes(); for (uint32_t i = 1; i < num_srcs; ++i) { const Sample* __restrict const in = srcs[i]->samples(); - if (srcs[i]->is_control()) { // control => audio + if (srcs[i]->is_control()) { // control => audio for (SampleCount j = 0; j < end; ++j) { out[j] += in[0]; } - } else if (srcs[i]->is_audio()) { // audio => audio + } else if (srcs[i]->is_audio()) { // audio => audio for (SampleCount j = 0; j < end; ++j) { out[j] += in[j]; } - } else if (srcs[i]->is_sequence()) { // sequence => audio + } else if (srcs[i]->is_sequence()) { // sequence => audio dst->render_sequence(ctx, srcs[i], true); } } |