diff options
Diffstat (limited to 'src/osd/interface/midiport.h')
-rw-r--r-- | src/osd/interface/midiport.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/osd/interface/midiport.h b/src/osd/interface/midiport.h new file mode 100644 index 00000000000..47c5bbc5c52 --- /dev/null +++ b/src/osd/interface/midiport.h @@ -0,0 +1,50 @@ +// license:BSD-3-Clause +// copyright-holders:Vas Crabb +/*************************************************************************** + + midiport.h + + OSD interface to midi ports + +***************************************************************************/ +#ifndef MAME_OSD_INTERFACE_MIDIPORT_H +#define MAME_OSD_INTERFACE_MIDIPORT_H + +#pragma once + +#include <cstdint> +#include <string> + + +namespace osd { + +class midi_input_port +{ +public: + virtual ~midi_input_port() = default; + + virtual bool poll() = 0; + virtual int read(uint8_t *pOut) = 0; +}; + + +class midi_output_port +{ +public: + virtual ~midi_output_port() = default; + + virtual void write(uint8_t data) = 0; +}; + +struct midi_port_info +{ + std::string name; + bool input; + bool output; + bool default_input; + bool default_output; +}; + +} // namespace osd + +#endif // MAME_OSD_INTERFACE_MIDIPORT_H |