From 4541e87aa843dd97c542f7c66fcbc0a16ffbcee5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 5 Apr 2007 17:06:53 +0000 Subject: Code cleanups. git-svn-id: http://svn.drobilla.net/lad/machina@399 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/machina/ActionFactory.hpp | 2 +- src/engine/machina/Driver.hpp | 3 +-- src/engine/machina/Engine.hpp | 3 ++- src/engine/machina/JackDriver.hpp | 7 ++++--- src/engine/machina/LearnRequest.hpp | 8 +++++--- src/engine/machina/Loader.hpp | 2 +- src/engine/machina/Machine.hpp | 6 ++---- src/engine/machina/MachineBuilder.hpp | 2 +- src/engine/machina/MidiAction.hpp | 2 +- src/engine/machina/Recorder.hpp | 2 +- src/engine/machina/SMFDriver.hpp | 2 +- src/engine/machina/types.hpp | 6 ------ 12 files changed, 20 insertions(+), 25 deletions(-) (limited to 'src/engine/machina') diff --git a/src/engine/machina/ActionFactory.hpp b/src/engine/machina/ActionFactory.hpp index c43bf72..72303ee 100644 --- a/src/engine/machina/ActionFactory.hpp +++ b/src/engine/machina/ActionFactory.hpp @@ -12,7 +12,7 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MACHINA_ACTIONFACTORY_HPP diff --git a/src/engine/machina/Driver.hpp b/src/engine/machina/Driver.hpp index acc4278..c28bfcf 100644 --- a/src/engine/machina/Driver.hpp +++ b/src/engine/machina/Driver.hpp @@ -1,5 +1,4 @@ /* This file is part of Machina. - * _engine->driver()->reset_time(); * Copyright (C) 2007 Dave Robillard * * Machina is free software; you can redistribute it and/or modify it under the @@ -13,7 +12,7 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MACHINA_DRIVER_HPP diff --git a/src/engine/machina/Engine.hpp b/src/engine/machina/Engine.hpp index dc47b2a..a7d0ed7 100644 --- a/src/engine/machina/Engine.hpp +++ b/src/engine/machina/Engine.hpp @@ -20,6 +20,7 @@ #include #include +#include #include "machina/Driver.hpp" namespace Machina { @@ -38,7 +39,7 @@ public: SharedPtr load_machine(const Glib::ustring& uri); SharedPtr import_machine(const Glib::ustring& uri); - SharedPtr learn_midi(const Glib::ustring& uri); + SharedPtr import_midi(const Glib::ustring& uri, Raul::BeatTime d); void set_bpm(double bpm); void set_quantization(double beat_fraction); diff --git a/src/engine/machina/JackDriver.hpp b/src/engine/machina/JackDriver.hpp index 1ab6643..ce95462 100644 --- a/src/engine/machina/JackDriver.hpp +++ b/src/engine/machina/JackDriver.hpp @@ -12,7 +12,7 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MACHINA_JACKDRIVER_HPP @@ -69,8 +69,9 @@ public: void finish_record(); private: - void process_input(SharedPtr machine, - const Raul::TimeSlice& time); + void process_input(SharedPtr machine, + const Raul::TimeSlice& time); + virtual void on_process(jack_nframes_t nframes); Raul::Semaphore _machine_changed; diff --git a/src/engine/machina/LearnRequest.hpp b/src/engine/machina/LearnRequest.hpp index 9284e90..20c02e5 100644 --- a/src/engine/machina/LearnRequest.hpp +++ b/src/engine/machina/LearnRequest.hpp @@ -43,10 +43,12 @@ public: return ret; } + void start(double q, BeatTime time) + { _started = true; _start_time = time; _quantization = q; } + void finish(BeatTime time); - - void start(double q, BeatTime time) { _started = true; _start_time = time; _quantization = q; } - bool started() { return _started; } + + bool started() { return _started; } const SharedPtr& node() { return _node; } const SharedPtr& enter_action() { return _enter_action; } diff --git a/src/engine/machina/Loader.hpp b/src/engine/machina/Loader.hpp index af35c56..7e296c0 100644 --- a/src/engine/machina/Loader.hpp +++ b/src/engine/machina/Loader.hpp @@ -12,7 +12,7 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MACHINA_LOADER_HPP diff --git a/src/engine/machina/Machine.hpp b/src/engine/machina/Machine.hpp index 14632f0..9504217 100644 --- a/src/engine/machina/Machine.hpp +++ b/src/engine/machina/Machine.hpp @@ -56,10 +56,8 @@ public: // Any context Raul::BeatTime time() { return _time; } - //LearnRequest pop_learn() { return _pending_learns.pop_front(); } - //SharedPtr first_learn() { return *_pending_learns.begin(); } - SharedPtr pending_learn() { return _pending_learn; } - void clear_pending_learn() { _pending_learn.reset(); } + SharedPtr pending_learn() { return _pending_learn; } + void clear_pending_learn() { _pending_learn.reset(); } typedef Raul::List > Nodes; Nodes& nodes() { return _nodes; } diff --git a/src/engine/machina/MachineBuilder.hpp b/src/engine/machina/MachineBuilder.hpp index 25104e8..ddb3e02 100644 --- a/src/engine/machina/MachineBuilder.hpp +++ b/src/engine/machina/MachineBuilder.hpp @@ -12,7 +12,7 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MACHINA_MACHINEBUILDER_HPP diff --git a/src/engine/machina/MidiAction.hpp b/src/engine/machina/MidiAction.hpp index 510c0d0..6541f0e 100644 --- a/src/engine/machina/MidiAction.hpp +++ b/src/engine/machina/MidiAction.hpp @@ -12,7 +12,7 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MACHINA_MIDIACTION_HPP diff --git a/src/engine/machina/Recorder.hpp b/src/engine/machina/Recorder.hpp index 1bc07c3..d03f6fc 100644 --- a/src/engine/machina/Recorder.hpp +++ b/src/engine/machina/Recorder.hpp @@ -12,7 +12,7 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MACHINA_RECORDER_HPP diff --git a/src/engine/machina/SMFDriver.hpp b/src/engine/machina/SMFDriver.hpp index 7b22a26..af6e1bb 100644 --- a/src/engine/machina/SMFDriver.hpp +++ b/src/engine/machina/SMFDriver.hpp @@ -12,7 +12,7 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MACHINA_SMFDRIVER_HPP diff --git a/src/engine/machina/types.hpp b/src/engine/machina/types.hpp index 70eae7d..6e661ef 100644 --- a/src/engine/machina/types.hpp +++ b/src/engine/machina/types.hpp @@ -18,14 +18,8 @@ #ifndef MACHINA_TYPES_HPP #define MACHINA_TYPES_HPP -#include - namespace Machina { - -//typedef jack_nframes_t FrameCount; -//typedef jack_nframes_t Timestamp; - typedef unsigned char byte; } // namespace Machina -- cgit v1.2.1