[openbeos-midi] Re: BMidiPort is finished

  • From: "Matthijs Hollemans" <matthijs@xxxxxxxxxxxxxxxxxxx>
  • To: <openbeos-midi@xxxxxxxxxxxxx>
  • Date: Sat, 16 Nov 2002 11:18:50 +0100

Jerome,

I just looked at the code and I have a remark. In MidiPort.cpp, you
do this:

#include "MidiPortConsumer.cpp"

And in MidiPortConsumer.cpp you define the MidiPortConsumer class
with all of its functions declared inline.

Although this works, I suggest that you never include .cpp files,
only .h files. So either rename MidiPortConsumer.cpp to
MidiPortConsumer.h, or cut and paste the MidiPortConsumer class into
MidiPort.cpp. I prefer the latter approach, especially since
MidiPortConsumer is only a small class. Anyway, you decide.

Other than that, the code looks pretty good!

One word of caution if you want to test this: I set up the Jamfile
for libmidi to link with libmidi2, which is necessary. But when you
build OpenBeOS libmidi, it links with OpenBeOS libmidi2, which does
not do anything yet. Normally this should work just fine, since our
libmidi2 is binary compatible with Be's libmidi2. But if you run
into really strange problems, then you may want to try and link
against Be's libmidi2 instead.

--
Matthijs



Other related posts: