Hallo @ all

This is my first post here, and i have no idea how this whole thing here 
works. So I hope it's not rude, just to ask questions.

I have problems opening a portmidi input or output on windows. 
Information is very rare and I found no examples on the web. I use 
lazarus and i can sucessfully compile my application. I can start 
porttime and get information about MIDI devices. However, when I try to 
open a device, I get a SIGSEGV and my program terminates, giving me no 
chance to read out information about the error that occured. This is how 
I call PM_OpenOutput:

error := Pm_OpenOutput(MIDIOutputStream, devNumber, Nil, 1024, Nil, Nil, 0);
if (error <> pmNoError) then showmessage('Error: ' + 
Pm_GetErrorText(error));

As I said, the error message never appears.
I found this in doxygen:

outputDriverInfo is a pointer to an optional driver specific data 
structure containing additional information for device setup or handle 
processing. outputDriverInfo is never required for correct operation. If 
not used outputDriverInfo should be NULL.

so i assume its safe to pass a "nil" as "outputDriverInfo". The same 
applies to time_proc and time_info:

time_proc is a pointer to a procedure that returns time in milliseconds. 
It may be NULL, in which case a default millisecond timebase (PortTime) 
is used.

So I also pass nil here (porttime is running).

What's wrong in my setup? My guess: the Stream pointer 
(MIDIOutputStream) is pointing to nowhere, when attempting to open a 
device but I have no idea how to initialise it.

Thanks for any help,
Johannes Neumann
_______________________________________________
media_api mailing list
[email protected]
http://lists.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to