Opened 15 years ago

Closed 15 years ago

#5625 closed bug (fixed)

"MidiPortGlue" missing

Reported by: Pete Owned by: korli
Priority: normal Milestone: R1
Component: Kits/Midi Kit Version: R1/alpha1
Keywords: Cc: pete.goodeve@…, phoudoin
Blocked By: Blocking:
Platform: All

Description

In BeOS, an old-style BMidiPort appears (by default) to apps which use the new MidiKit as an endpoint named "MidiPortGlue". In Haiku this doesn't happen. SqueekySynth in particular uses such a port for MIDI input, so there's no way to drive it in Haiku, though it appears to work otherwise.

I'm attaching a bare-bones test app that simply creates a MidiPort and then hangs around until dismissed. Run it under BeOS, and PatchBay immediately shows the associated Midi2 endpoints. Do the same under Haiku (either the BeOS executable or recompiled) and no endpoints are shown.

Attachments (1)

TestPort.cpp (582 bytes ) - added by Pete 15 years ago.
Test app to create a BMidiPort

Download all attachments as: .zip

Change History (9)

by Pete, 15 years ago

Attachment: TestPort.cpp added

Test app to create a BMidiPort

comment:1 by jackburton, 15 years ago

I had a (very brief) look at the BMidiPort code, and it seems it correctly creates an endpoint called MidiPortGlue, so in theory it should work. I guess something goes wrong on the way.

comment:2 by jackburton, 15 years ago

Maybe I'm missing something but... are hardware drivers required in order to be able to open a midi port ? If so, that's the problem, I guess. We have no midi hardware drivers in haiku.

in reply to:  2 comment:3 by korli, 15 years ago

Replying to jackburton:

Maybe I'm missing something but... are hardware drivers required in order to be able to open a midi port ? If so, that's the problem, I guess. We have no midi hardware drivers in haiku.

I see at least usb_midi as a midi hardware driver.

comment:4 by Pete, 15 years ago

It looks like the reason is pretty simple: the "MidiPortGlue" endpoints are never registered!

I added the following lines in the constructor in BMidiPort.cpp, line 32:

    BMidiRoster::Register(fLocalSource);
    BMidiRoster::Register(fLocalSink);

[Easier for me than entering a patch for just two lines... Sorry about the spaces for tabs.]

Now the ports appear in PatchBay as they should, and SqueekySynth appears to be working (if only the audio on my machine wasn't being balky at the moment (:-/)

in reply to:  2 comment:5 by Pete, 15 years ago

Replying to jackburton:

Maybe I'm missing something but... are hardware drivers required in order to be able to open a midi port ? If so, that's the problem, I guess. We have no midi hardware drivers in haiku.

Well I'm happily using my MIDI-USB link in Haiku... (:-)) (and the Glue endpoints should appear the moment the port is created -- it doesn't have to be connected to any hardware.)

comment:6 by Pete, 15 years ago

Cc: pete.goodeve@… added

comment:7 by phoudoin, 15 years ago

Cc: phoudoin added

comment:8 by korli, 15 years ago

Resolution: fixed
Status: newclosed

Committed in hrev36019. I added Unregister calls.

Note: See TracTickets for help on using tickets.