1#ifndef MIDIINWINDOWS_HH
2#define MIDIINWINDOWS_HH
6#ifndef WIN32_LEAN_AND_MEAN
7#define WIN32_LEAN_AND_MEAN
18#include <condition_variable>
23class EventDistributor;
25class PluggingController;
27class MidiInWindows final :
public MidiInDevice,
private EventListener
32 static void registerAll(EventDistributor& eventDistributor,
34 PluggingController& controller);
36 MidiInWindows(EventDistributor& eventDistributor, Scheduler& scheduler,
38 ~MidiInWindows()
override;
41 void plugHelper(Connector& connector, EmuTime::param time)
override;
42 void unplugHelper(EmuTime::param time)
override;
43 [[nodiscard]] std::string_view getName()
const override;
44 [[nodiscard]] std::string_view getDescription()
const override;
47 void signal(EmuTime::param time)
override;
49 template<
typename Archive>
50 void serialize(Archive& ar,
unsigned version);
56 bool signalEvent(
const Event& event)
override;
58 void procShortMsg(
long unsigned param);
59 void procLongMsg(LPMIDIHDR p);
62 EventDistributor& eventDistributor;
65 std::mutex devIdxMutex;
66 std::condition_variable devIdxCond;
67 unsigned devIdx = unsigned(-1);
68 std::mutex threadIdMutex;
69 std::condition_variable threadIdCond;
72 std::mutex queueMutex;
This implements a queue on top of circular_buffer (not part of boost).
This file implemented 3 utility functions:
void serialize(Archive &ar, T &t, unsigned version)