RAUL  0.5.1
MIDISink.hpp
1 /* This file is part of Raul.
2  * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
3  *
4  * Raul is free software; you can redistribute it and/or modify it under the
5  * terms of the GNU General Public License as published by the Free Software
6  * Foundation; either version 2 of the License, or (at your option) any later
7  * version.
8  *
9  * Raul is distributed in the hope that it will be useful, but WITHOUT ANY
10  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16  */
17 
18 #ifndef RAUL_MIDI_SINK_HPP
19 #define RAUL_MIDI_SINK_HPP
20 
21 #include <stdexcept>
22 #include <raul/TimeStamp.hpp>
23 #include <raul/Deletable.hpp>
24 
25 namespace Raul {
26 
27 
30 class MIDISink : public Deletable {
31 public:
32  virtual void write_event(TimeStamp time,
33  size_t ev_size,
34  const uint8_t* ev) throw (std::logic_error) = 0;
35 };
36 
37 
38 } // namespace Raul
39 
40 #endif // RAUL_MIDI_SINK_HPP
41 
Something with a virtual destructor.
Definition: Deletable.hpp:28
Pure virtual base for anything you can write MIDI to.
Definition: MIDISink.hpp:30
A real-time time stamp (possible units: frame, absolute (s), or beat).
Definition: TimeStamp.hpp:78