1#ifndef MIDIINCOREMIDI_HH
2#define MIDIINCOREMIDI_HH
11#include <CoreMIDI/MIDIServices.h>
16class EventDistributor;
18class PluggingController;
22class MidiInCoreMIDI final :
public MidiInDevice,
private EventListener
25 static void registerAll(EventDistributor& eventDistributor,
26 Scheduler& scheduler, PluggingController& controller);
31 explicit MidiInCoreMIDI(EventDistributor& eventDistributor_,
32 Scheduler& scheduler_, MIDIEndpointRef endpoint);
36 void plugHelper(Connector& connector, EmuTime::param time)
override;
37 void unplugHelper(EmuTime::param time)
override;
38 [[nodiscard]] std::string_view getName()
const override;
39 [[nodiscard]] std::string_view getDescription()
const override;
42 void signal(EmuTime::param time)
override;
44 template<
typename Archive>
45 void serialize(Archive& ar,
unsigned version);
50 bool signalEvent(
const Event& event)
override;
52 static void sendPacketList(
const MIDIPacketList *pktList,
53 void *readProcRefCon,
void *srcConnRefCon);
54 void sendPacketList(
const MIDIPacketList *pktList,
void *srcConnRefCon);
57 EventDistributor& eventDistributor;
64 MIDIEndpointRef endpoint;
74class MidiInCoreMIDIVirtual final :
public MidiInDevice,
private EventListener
77 explicit MidiInCoreMIDIVirtual(EventDistributor& eventDistributor_,
78 Scheduler& scheduler_);
79 ~MidiInCoreMIDIVirtual();
82 void plugHelper(Connector& connector, EmuTime::param time)
override;
83 void unplugHelper(EmuTime::param time)
override;
84 std::string_view getName()
const override;
85 std::string_view getDescription()
const override;
88 void signal(EmuTime::param time)
override;
90 template<
typename Archive>
91 void serialize(Archive& ar,
unsigned version);
95 bool signalEvent(
const Event& event)
override;
97 static void sendPacketList(
const MIDIPacketList *pktList,
98 void *readProcRefCon,
void *srcConnRefCon);
99 void sendPacketList(
const MIDIPacketList *pktList,
void *srcConnRefCon);
101 EventDistributor& eventDistributor;
106 MIDIClientRef client;
107 MIDIEndpointRef endpoint;
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)