boo/include/boo/audiodev/MIDIDecoder.hpp
2016-05-20 12:57:34 -10:00

29 lines
710 B
C++

#ifndef BOO_MIDIDECODER_HPP
#define BOO_MIDIDECODER_HPP
#include "boo/audiodev/IMIDIReader.hpp"
#include "boo/audiodev/IMIDIPort.hpp"
#include <functional>
#include <vector>
namespace boo
{
class MIDIDecoder
{
IMIDIReader& m_out;
uint8_t m_status = 0;
bool _readContinuedValue(std::vector<uint8_t>::const_iterator& it,
std::vector<uint8_t>::const_iterator end,
uint32_t& valOut);
public:
MIDIDecoder(IMIDIReader& out) : m_out(out) {}
std::vector<uint8_t>::const_iterator
receiveBytes(std::vector<uint8_t>::const_iterator begin,
std::vector<uint8_t>::const_iterator end);
};
}
#endif // BOO_MIDIDECODER_HPP