summaryrefslogtreecommitdiffstats
path: root/src/server/internals/Time.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/internals/Time.cpp')
-rw-r--r--src/server/internals/Time.cpp44
1 files changed, 26 insertions, 18 deletions
diff --git a/src/server/internals/Time.cpp b/src/server/internals/Time.cpp
index 3b6f12ba..2ea09b0b 100644
--- a/src/server/internals/Time.cpp
+++ b/src/server/internals/Time.cpp
@@ -14,33 +14,43 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "internals/Time.hpp"
+#include "Time.hpp"
#include "Buffer.hpp"
+#include "BufferFactory.hpp"
+#include "BufferRef.hpp"
#include "Driver.hpp"
#include "Engine.hpp"
#include "InternalPlugin.hpp"
#include "OutputPort.hpp"
+#include "PortType.hpp"
#include "RunContext.hpp"
-#include "util.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/URIs.hpp"
-#include "lv2/atom/util.h"
-#include "lv2/midi/midi.h"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <lv2/atom/atom.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Symbol.hpp>
+
+#include <memory>
+
+namespace ingen::server {
+
+class GraphImpl;
-namespace ingen {
-namespace server {
namespace internals {
InternalPlugin* TimeNode::internal_plugin(URIs& uris) {
return new InternalPlugin(
- uris, URI(NS_INTERNALS "Time"), Raul::Symbol("time"));
+ uris, URI(NS_INTERNALS "Time"), raul::Symbol("time"));
}
TimeNode::TimeNode(InternalPlugin* plugin,
BufferFactory& bufs,
- const Raul::Symbol& symbol,
+ const raul::Symbol& symbol,
bool polyphonic,
GraphImpl* parent,
SampleRate srate)
@@ -50,7 +60,7 @@ TimeNode::TimeNode(InternalPlugin* plugin,
_ports = bufs.maid().make_managed<Ports>(1);
_notify_port = new OutputPort(
- bufs, this, Raul::Symbol("notify"), 0, 1,
+ bufs, this, raul::Symbol("notify"), 0, 1,
PortType::ATOM, uris.atom_Sequence, Atom(), 1024);
_notify_port->set_property(uris.lv2_name, bufs.forge().alloc("Notify"));
_notify_port->set_property(uris.atom_supports,
@@ -59,10 +69,10 @@ TimeNode::TimeNode(InternalPlugin* plugin,
}
void
-TimeNode::run(RunContext& context)
+TimeNode::run(RunContext& ctx)
{
- BufferRef buf = _notify_port->buffer(0);
- LV2_Atom_Sequence* seq = buf->get<LV2_Atom_Sequence>();
+ const BufferRef buf = _notify_port->buffer(0);
+ auto* const seq = buf->get<LV2_Atom_Sequence>();
// Initialise output to the empty sequence
seq->atom.type = _notify_port->bufs().uris().atom_Sequence;
@@ -71,10 +81,8 @@ TimeNode::run(RunContext& context)
seq->body.pad = 0;
// Ask the driver to append any time events for this cycle
- context.engine().driver()->append_time_events(
- context, *_notify_port->buffer(0));
+ ctx.engine().driver()->append_time_events(ctx, *_notify_port->buffer(0));
}
} // namespace internals
-} // namespace server
-} // namespace ingen
+} // namespace ingen::server