summaryrefslogtreecommitdiffstats
path: root/raul/MIDISink.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-03-03 04:40:05 +0000
committerDavid Robillard <d@drobilla.net>2007-03-03 04:40:05 +0000
commitb2aae23b3443a75cf163c3ee7a1c1477394fbc80 (patch)
treeff7c449aa19038b64e1209671d835bd581a1ab74 /raul/MIDISink.h
parent8c0f1f09edb23123e6e51049952505970ec5e3f5 (diff)
downloadraul-b2aae23b3443a75cf163c3ee7a1c1477394fbc80.tar.gz
raul-b2aae23b3443a75cf163c3ee7a1c1477394fbc80.tar.bz2
raul-b2aae23b3443a75cf163c3ee7a1c1477394fbc80.zip
SMF writing work.
git-svn-id: http://svn.drobilla.net/lad/raul@343 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul/MIDISink.h')
-rw-r--r--raul/MIDISink.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/raul/MIDISink.h b/raul/MIDISink.h
new file mode 100644
index 0000000..fe5f4e8
--- /dev/null
+++ b/raul/MIDISink.h
@@ -0,0 +1,41 @@
+/* This file is part of Raul.
+ * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
+ *
+ * Raul is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * Raul is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ *
+ * 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
+ */
+
+#ifndef RAUL_MIDISINK_H
+#define RAUL_MIDISINK_H
+
+#include <stdexcept>
+#include <raul/TimeSlice.h>
+#include <raul/Deletable.h>
+
+namespace Raul {
+
+
+/** Pure virtual base for anything you can write MIDI to.
+ */
+class MIDISink : public Deletable {
+public:
+ virtual void write_event(BeatTime time,
+ size_t ev_size,
+ const unsigned char* ev) throw (std::logic_error) = 0;
+};
+
+
+} // namespace Raul
+
+#endif // RAUL_MIDISINK_H
+