mirror of
https://github.com/AxioDL/boo.git
synced 2025-08-28 22:45:45 +00:00
29 lines
710 B
C++
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
|