Restore the "GPL licensing not permitted" in GLUT license headers.
[haiku.git] / headers / os / midi2 / MidiConsumer.h
blobf2d2da23017ae907a262bde3a0a403f9e36e58f0
2 #ifndef _MIDI_CONSUMER_H
3 #define _MIDI_CONSUMER_H
5 #include <MidiEndpoint.h>
7 namespace BPrivate { class BMidiRosterLooper; }
9 class BMidiConsumer : public BMidiEndpoint
11 public:
13 bigtime_t Latency() const;
15 private:
17 friend class BMidiLocalConsumer;
18 friend class BMidiLocalProducer;
19 friend class BMidiRoster;
20 friend class BPrivate::BMidiRosterLooper;
22 BMidiConsumer(const char *name = NULL);
23 virtual ~BMidiConsumer();
25 virtual void _Reserved1();
26 virtual void _Reserved2();
27 virtual void _Reserved3();
28 virtual void _Reserved4();
29 virtual void _Reserved5();
30 virtual void _Reserved6();
31 virtual void _Reserved7();
32 virtual void _Reserved8();
34 port_id fPort;
35 bigtime_t fLatency;
37 uint32 _reserved[2];
40 class BMidiLocalConsumer : public BMidiConsumer
42 public:
44 BMidiLocalConsumer(const char *name = NULL);
46 void SetLatency(bigtime_t latency);
47 int32 GetProducerID();
49 void SetTimeout(bigtime_t when, void *data);
50 virtual void Timeout(void *data);
52 virtual void Data(
53 uchar *data, size_t length, bool atomic, bigtime_t time);
55 virtual void NoteOff(
56 uchar channel, uchar note, uchar velocity, bigtime_t time);
58 virtual void NoteOn(
59 uchar channel, uchar note, uchar velocity, bigtime_t time);
61 virtual void KeyPressure(
62 uchar channel, uchar note, uchar pressure, bigtime_t time);
64 virtual void ControlChange(
65 uchar channel, uchar controlNumber, uchar controlValue,
66 bigtime_t time);
68 virtual void ProgramChange(
69 uchar channel, uchar programNumber, bigtime_t time);
71 virtual void ChannelPressure(
72 uchar channel, uchar pressure, bigtime_t time);
74 virtual void PitchBend(
75 uchar channel, uchar lsb, uchar msb, bigtime_t time);
77 virtual void SystemExclusive(
78 void* data, size_t length, bigtime_t time);
80 virtual void SystemCommon(
81 uchar status, uchar data1, uchar data2, bigtime_t time);
83 virtual void SystemRealTime(uchar status, bigtime_t time);
85 virtual void TempoChange(int32 beatsPerMinute, bigtime_t time);
87 virtual void AllNotesOff(bool justChannel, bigtime_t time);
89 protected:
91 ~BMidiLocalConsumer();
93 private:
95 friend class BMidiRoster;
96 friend int32 _midi_event_thread(void *);
98 virtual void _Reserved1();
99 virtual void _Reserved2();
100 virtual void _Reserved3();
101 virtual void _Reserved4();
102 virtual void _Reserved5();
103 virtual void _Reserved6();
104 virtual void _Reserved7();
105 virtual void _Reserved8();
107 int32 EventThread();
109 bigtime_t fTimeout;
110 void* fTimeoutData;
111 int32 fCurrentProducer;
112 thread_id fThread;
114 uint32 _reserved[1];
117 #endif // _MIDI_CONSUMER_H