tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / kits / midi / MidiGlue.cpp
blobed7acb7a1d48cef879d6cc369c269b6cb60343e5
1 /*
2 * Copyright 2006, Haiku.
4 * Copyright (c) 2003 Matthijs Hollemans
5 * Copyright (c) 2002 Jerome Leveque
6 * Distributed under the terms of the MIT License.
8 * Authors:
9 * Matthijs Hollemans
10 * Jérôme Leveque
13 #include <Midi.h>
14 #include "MidiGlue.h"
15 #include <MidiPort.h>
17 using namespace BPrivate;
20 BMidiGlue::BMidiGlue(BMidi* midiObject_, const char* name)
21 : BMidiLocalConsumer(name)
23 fMidiObject = midiObject_;
27 void
28 BMidiGlue::NoteOff(
29 uchar channel, uchar note, uchar velocity, bigtime_t time)
31 fMidiObject->NoteOff(channel + 1, note, velocity, MAKE_TIME(time));
35 void
36 BMidiGlue::NoteOn(
37 uchar channel, uchar note, uchar velocity, bigtime_t time)
39 fMidiObject->NoteOn(channel + 1, note, velocity, MAKE_TIME(time));
43 void
44 BMidiGlue::KeyPressure(
45 uchar channel, uchar note, uchar pressure, bigtime_t time)
47 fMidiObject->KeyPressure(channel + 1, note, pressure, MAKE_TIME(time));
51 void
52 BMidiGlue::ControlChange(
53 uchar channel, uchar controlNumber, uchar controlValue, bigtime_t time)
55 fMidiObject->ControlChange(
56 channel + 1, controlNumber, controlValue, MAKE_TIME(time));
60 void
61 BMidiGlue::ProgramChange(
62 uchar channel, uchar programNumber, bigtime_t time)
64 fMidiObject->ProgramChange(channel + 1, programNumber, MAKE_TIME(time));
68 void
69 BMidiGlue::ChannelPressure(
70 uchar channel, uchar pressure, bigtime_t time)
72 fMidiObject->ChannelPressure(channel + 1, pressure, MAKE_TIME(time));
76 void
77 BMidiGlue::PitchBend(
78 uchar channel, uchar lsb, uchar msb, bigtime_t time)
80 fMidiObject->PitchBend(channel + 1, lsb, msb, MAKE_TIME(time));
84 void
85 BMidiGlue::SystemExclusive(
86 void* data, size_t length, bigtime_t time)
88 fMidiObject->SystemExclusive(data, length, MAKE_TIME(time));
92 void
93 BMidiGlue::SystemCommon(
94 uchar status, uchar data1, uchar data2, bigtime_t time)
96 fMidiObject->SystemCommon(status, data1, data2, MAKE_TIME(time));
100 void
101 BMidiGlue::SystemRealTime(uchar status, bigtime_t time)
103 fMidiObject->SystemRealTime(status, MAKE_TIME(time));
107 void
108 BMidiGlue::TempoChange(int32 beatsPerMinute, bigtime_t time)
110 fMidiObject->TempoChange(beatsPerMinute, MAKE_TIME(time));
114 BMidiPortGlue::BMidiPortGlue(BMidiPort* midiObject_, const char* name)
115 : BMidiLocalConsumer(name)
117 fMidiObject = midiObject_;
121 void
122 BMidiPortGlue::NoteOff(
123 uchar channel, uchar note, uchar velocity, bigtime_t time)
125 fMidiObject->SprayNoteOff(channel + 1, note, velocity, MAKE_TIME(time));
129 void
130 BMidiPortGlue::NoteOn(
131 uchar channel, uchar note, uchar velocity, bigtime_t time)
133 fMidiObject->SprayNoteOn(channel + 1, note, velocity, MAKE_TIME(time));
137 void
138 BMidiPortGlue::KeyPressure(
139 uchar channel, uchar note, uchar pressure, bigtime_t time)
141 fMidiObject->SprayKeyPressure(
142 channel + 1, note, pressure, MAKE_TIME(time));
146 void
147 BMidiPortGlue::ControlChange(
148 uchar channel, uchar controlNumber, uchar controlValue, bigtime_t time)
150 fMidiObject->SprayControlChange(
151 channel + 1, controlNumber, controlValue, MAKE_TIME(time));
155 void
156 BMidiPortGlue::ProgramChange(
157 uchar channel, uchar programNumber, bigtime_t time)
159 fMidiObject->SprayProgramChange(
160 channel + 1, programNumber, MAKE_TIME(time));
164 void
165 BMidiPortGlue::ChannelPressure(
166 uchar channel, uchar pressure, bigtime_t time)
168 fMidiObject->SprayChannelPressure(channel + 1, pressure, MAKE_TIME(time));
172 void
173 BMidiPortGlue::PitchBend(
174 uchar channel, uchar lsb, uchar msb, bigtime_t time)
176 fMidiObject->SprayPitchBend(channel + 1, lsb, msb, MAKE_TIME(time));
180 void
181 BMidiPortGlue::SystemExclusive(
182 void* data, size_t length, bigtime_t time)
184 fMidiObject->SpraySystemExclusive(data, length, MAKE_TIME(time));
188 void
189 BMidiPortGlue::SystemCommon(
190 uchar status, uchar data1, uchar data2, bigtime_t time)
192 fMidiObject->SpraySystemCommon(status, data1, data2, MAKE_TIME(time));
196 void
197 BMidiPortGlue::SystemRealTime(uchar status, bigtime_t time)
199 fMidiObject->SpraySystemRealTime(status, MAKE_TIME(time));
203 void
204 BMidiPortGlue::TempoChange(int32 beatsPerMinute, bigtime_t time)
206 fMidiObject->SprayTempoChange(beatsPerMinute, MAKE_TIME(time));