[Prev][Next][Index][Thread]
Re: Here's a midi question for you....
Thanks Chris,
but still having troubles..... :o(
// My Code
// creating the midi event (only one)
let LPmidievent = make (<LPMIDIEVENT>);
LPmidievent.dwEvent-value := (#x007F3C90);
// creating the midi header
let LPmidiheader = make(<LPMIDIHDR>);
// LPmidiheader.lpData-value := c-type-cast(<LPSTR>, LPmidievent);
LPmidiheader.lpData-value := pointer-cast(<LPSTR>, LPmidievent);
LPmidiheader.dwBufferLength-value := size-of(<MIDIEVENT>);
LPMidiheader.dwBytesRecorded-value := size-of(<MIDIEVENT>);
Thanks for the pointer-cast tip, I'd been using c-type-cast(<LPSTR>, event);
(although I think this has the same effect) and thought it was this causing
the problem but
with pointer-cast, I'm still getting the same error so perhaps it's
something else.....
I get an error when calling midiStreamOut after this :
result := midiOutPrepareHeader(outHandle, LPmidiheader,
size-of(<MIDIHDR>));
result := midiStreamOut(outHandle, LPmidiheader, size-of(<MIDIHDR>));
result stores the error value 11 giving the message (in midiOutGetErrorText)
'An invalid parameter was passed to a system function'
It may just be a matter of altering each of the values until I find the
problem......
Selena
Follow-Ups:
References: