summaryrefslogtreecommitdiffstats
path: root/src/server/internals
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/internals')
-rw-r--r--src/server/internals/Controller.cpp9
-rw-r--r--src/server/internals/Note.cpp7
-rw-r--r--src/server/internals/Time.cpp4
-rw-r--r--src/server/internals/Trigger.cpp13
4 files changed, 18 insertions, 15 deletions
diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp
index a4f7ef43..4c253cc1 100644
--- a/src/server/internals/Controller.cpp
+++ b/src/server/internals/Controller.cpp
@@ -110,11 +110,12 @@ ControllerNode::ControllerNode(InternalPlugin* plugin,
void
ControllerNode::run(RunContext& context)
{
- const BufferRef midi_in = _midi_in_port->buffer(0);
- LV2_Atom_Sequence* seq = midi_in->get<LV2_Atom_Sequence>();
- const BufferRef midi_out = _midi_out_port->buffer(0);
+ const BufferRef midi_in = _midi_in_port->buffer(0);
+ auto* seq = midi_in->get<LV2_Atom_Sequence>();
+ const BufferRef midi_out = _midi_out_port->buffer(0);
+
LV2_ATOM_SEQUENCE_FOREACH(seq, ev) {
- const uint8_t* buf = static_cast<const uint8_t*>(LV2_ATOM_BODY_CONST(&ev->body));
+ const auto* buf = static_cast<const uint8_t*>(LV2_ATOM_BODY_CONST(&ev->body));
if (ev->body.type == _midi_in_port->bufs().uris().midi_MidiEvent &&
ev->body.size >= 3 &&
lv2_midi_message_type(buf) == LV2_MIDI_MSG_CONTROLLER) {
diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp
index 0d375eac..b2a22c14 100644
--- a/src/server/internals/Note.cpp
+++ b/src/server/internals/Note.cpp
@@ -164,10 +164,11 @@ NoteNode::apply_poly(RunContext& context, uint32_t poly)
void
NoteNode::run(RunContext& context)
{
- Buffer* const midi_in = _midi_in_port->buffer(0).get();
- LV2_Atom_Sequence* seq = midi_in->get<LV2_Atom_Sequence>();
+ Buffer* const midi_in = _midi_in_port->buffer(0).get();
+ auto* seq = midi_in->get<LV2_Atom_Sequence>();
+
LV2_ATOM_SEQUENCE_FOREACH(seq, ev) {
- const uint8_t* buf =
+ const auto* buf =
static_cast<const uint8_t*>(LV2_ATOM_BODY_CONST(&ev->body));
const FrameTime time =
diff --git a/src/server/internals/Time.cpp b/src/server/internals/Time.cpp
index 3b6f12ba..a771b9a9 100644
--- a/src/server/internals/Time.cpp
+++ b/src/server/internals/Time.cpp
@@ -61,8 +61,8 @@ TimeNode::TimeNode(InternalPlugin* plugin,
void
TimeNode::run(RunContext& context)
{
- BufferRef buf = _notify_port->buffer(0);
- LV2_Atom_Sequence* seq = buf->get<LV2_Atom_Sequence>();
+ BufferRef buf = _notify_port->buffer(0);
+ auto* seq = buf->get<LV2_Atom_Sequence>();
// Initialise output to the empty sequence
seq->atom.type = _notify_port->bufs().uris().atom_Sequence;
diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp
index f9c21438..0fe5715c 100644
--- a/src/server/internals/Trigger.cpp
+++ b/src/server/internals/Trigger.cpp
@@ -106,17 +106,18 @@ TriggerNode::TriggerNode(InternalPlugin* plugin,
void
TriggerNode::run(RunContext& context)
{
- const BufferRef midi_in = _midi_in_port->buffer(0);
- LV2_Atom_Sequence* const seq = midi_in->get<LV2_Atom_Sequence>();
- const BufferRef midi_out = _midi_out_port->buffer(0);
+ const BufferRef midi_in = _midi_in_port->buffer(0);
+ auto* const seq = midi_in->get<LV2_Atom_Sequence>();
+ const BufferRef midi_out = _midi_out_port->buffer(0);
// Initialise output to the empty sequence
midi_out->prepare_write(context);
LV2_ATOM_SEQUENCE_FOREACH(seq, ev) {
- const int64_t t = ev->time.frames;
- const uint8_t* buf = static_cast<const uint8_t*>(LV2_ATOM_BODY_CONST(&ev->body));
- bool emit = false;
+ const int64_t t = ev->time.frames;
+ const auto* buf =
+ static_cast<const uint8_t*>(LV2_ATOM_BODY_CONST(&ev->body));
+ bool emit = false;
if (ev->body.type == _midi_in_port->bufs().uris().midi_MidiEvent &&
ev->body.size >= 3) {
const FrameTime time = context.start() + t;