Revert "update wavesaudio backend, now supports Windows (ASIO) as well as OS X (CoreA...
[ardour.git] / libs / backends / wavesaudio / waves_midiport.h
1 /*\r
2     Copyright (C) 2014 Waves Audio Ltd.\r
3 \r
4     This program is free software; you can redistribute it and/or modify\r
5     it under the terms of the GNU General Public License as published by\r
6     the Free Software Foundation; either version 2 of the License, or\r
7     (at your option) any later version.\r
8 \r
9     This program is distributed in the hope that it will be useful,\r
10     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
12     GNU General Public License for more details.\r
13 \r
14     You should have received a copy of the GNU General Public License\r
15     along with this program; if not, write to the Free Software\r
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
17 \r
18 */\r
19 \r
20 #ifndef __libardour_waves_midiport_h__\r
21 #define __libardour_waves_midiport_h__\r
22 \r
23 #include "waves_dataport.h"\r
24 #include "waves_midi_buffer.h"\r
25 \r
26 namespace ARDOUR {\r
27 \r
28 class WavesMidiEvent;\r
29 class WavesMidiDevice;\r
30 class WavesMidiEvent;\r
31 \r
32 class WavesMidiPort : public WavesDataPort {\r
33 public:\r
34     enum BufferSize {\r
35         // This value has nothing to do with reality as buffer of MIDI Port is not a flat array.\r
36         // It's an iterated list.\r
37         MAX_BUFFER_SIZE_BYTES = 8192\r
38     };\r
39 \r
40     WavesMidiPort (const std::string& port_name, PortFlags flags);\r
41     virtual ~WavesMidiPort (){};\r
42 \r
43     virtual DataType type () const {    return DataType::MIDI; };\r
44 \r
45     virtual void* get_buffer (pframes_t nframes);\r
46 \r
47     inline WavesMidiBuffer& buffer () { return _waves_midi_buffer; }\r
48     inline const WavesMidiBuffer& const_buffer () const { return _waves_midi_buffer; }\r
49 \r
50     inline void set_midi_device (WavesMidiDevice* midi_device) { _midi_device = midi_device; };\r
51     inline WavesMidiDevice* midi_device () const { return _midi_device; };\r
52 \r
53 protected:\r
54         virtual void _wipe_buffer();\r
55 \r
56 private:\r
57     WavesMidiDevice * _midi_device;\r
58     WavesMidiBuffer _waves_midi_buffer;\r
59 };\r
60 \r
61 } // namespace\r
62 \r
63 #endif /* __libardour_waves_midiport_h__ */\r
64     \r