diff options
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/JackDriver.cpp | 3 | ||||
-rw-r--r-- | src/engine/MachineBuilder.cpp | 15 |
2 files changed, 3 insertions, 15 deletions
diff --git a/src/engine/JackDriver.cpp b/src/engine/JackDriver.cpp index d8442b1..072029d 100644 --- a/src/engine/JackDriver.cpp +++ b/src/engine/JackDriver.cpp @@ -191,8 +191,7 @@ JackDriver::read_input_recording(SPtr<Machine> machine, const TimeStamp rel_time_frames = TimeStamp(_frames_unit, ev.time); const TimeStamp time_frames = _record_dur + rel_time_frames; - _recorder->write(time.ticks_to_beats( - time_frames), ev.size, ev.buffer); + _recorder->write(time.ticks_to_beats(time_frames), ev.size, ev.buffer); } if (n_events > 0) { diff --git a/src/engine/MachineBuilder.cpp b/src/engine/MachineBuilder.cpp index 57d6c2f..27fb68c 100644 --- a/src/engine/MachineBuilder.cpp +++ b/src/engine/MachineBuilder.cpp @@ -15,8 +15,6 @@ * along with Machina. If not, see <http://www.gnu.org/licenses/>. */ -#include <algorithm> - #include "lv2/lv2plug.in/ns/ext/midi/midi.h" #include "machina/Machine.hpp" @@ -204,12 +202,7 @@ MachineBuilder::resolve_note(Raul::TimeStamp t, resolved->set_exit_action(SPtr<Action>()); set_node_duration(_connect_node, resolved->duration()); resolved = _connect_node; - if (std::find(_machine->nodes().begin(), - _machine->nodes().end(), - _connect_node) - == _machine->nodes().end()) { - _machine->add_node(_connect_node); - } + _machine->add_node(_connect_node); } else { _connect_node = resolved; @@ -301,13 +294,9 @@ MachineBuilder::resolve() } // Add initial note if necessary - if ((_machine->nodes().size() > 0) - && (std::find(_machine->nodes().begin(), _machine->nodes().end(), - _initial_node) - == _machine->nodes().end())) { + if (_machine->nodes().size() > 0) { _machine->add_node(_initial_node); } - } SPtr<Machine> |