From 399ddfc5b1d4f1f131362d0439821778c6681b23 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 30 Sep 2007 21:12:16 +0000 Subject: Better design for process() signature (pass everything needed in a single object parameter). Working port "monitoring" (connect an output to a control input, GUI will animate controller). git-svn-id: http://svn.drobilla.net/lad/ingen@788 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/MidiDriver.hpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/libs/engine/MidiDriver.hpp') diff --git a/src/libs/engine/MidiDriver.hpp b/src/libs/engine/MidiDriver.hpp index 13b87726..b4d7b1f1 100644 --- a/src/libs/engine/MidiDriver.hpp +++ b/src/libs/engine/MidiDriver.hpp @@ -18,10 +18,11 @@ #ifndef MIDIDRIVER_H #define MIDIDRIVER_H +#include #include "types.hpp" #include "Driver.hpp" -#include #include "MidiBuffer.hpp" +#include "ProcessContext.hpp" namespace Ingen { @@ -41,19 +42,13 @@ public: * * Realtime safe, run in audio thread before executing the graph for a cycle. */ - virtual void pre_process(ProcessContext& context, - SampleCount nframes, - FrameTime start, - FrameTime end) = 0; + virtual void pre_process(ProcessContext& context) = 0; /** Prepare output for the specified (just completed) cycle. * * Realtime safe, run in audio thread after executing the graph for a cycle. */ - virtual void post_process(ProcessContext& context, - SampleCount nframes, - FrameTime start, - FrameTime end) = 0; + virtual void post_process(ProcessContext& context) = 0; }; @@ -90,8 +85,8 @@ public: void add_port(DriverPort* port) {} DriverPort* remove_port(const Raul::Path& path) { return NULL; } - void pre_process(ProcessContext& context, SampleCount nframes, FrameTime start, FrameTime end) {} - void post_process(ProcessContext& context, SampleCount nframes, FrameTime start, FrameTime end) {} + void pre_process(ProcessContext& context) {} + void post_process(ProcessContext& context) {} }; -- cgit v1.2.1