2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
10 #include <proto/camd.h>
13 #include "camd_intern.h"
15 /*****************************************************************************
19 AROS_LH2(void, PutMidi
,
22 AROS_LHA(struct MidiLink
*, link
, A0
),
23 AROS_LHA(ULONG
, msg
, D0
),
26 struct CamdBase
*, CamdBase
, 23, Camd
)
29 Puts a midimessage to hardware and all sender-links that belongs
30 to the midilink's cluster. Does only wait if a hardware send-
31 buffer is full, and then tries again and again until the message
32 is sent. Else, the function should return immediately.
35 link - pointer to the midilink to send to.
36 msg - The complete message to send. A message can not hold more
37 than 3 bytes, so it fits fine in a ULONG integer. See NOTES
38 to see how a message is built up.
43 Sending an illegal message may have serious consequences. If you for
44 some reason are not completely shure whether your message is legal,
45 you could do the following test:
47 if((msg>>24)<0x80 || (msg>>24)==0xf0 || (msg>>24)==0xf7 || (msg>>16&0xff)>0x7f || (msg>>8&0xff)>0x7f){
48 debug("Warning, illegal midimessage: %x\n",msg);
50 PutMidi(midilink,msg);
64 2001-01-12 ksvalast first created
66 *****************************************************************************/
70 struct DriverData
*driverdata
;
73 driverdata
=GoodPutMidi(link
,msg
,OUTBUFFERSIZE
-1);
75 driverdata
=GoodPutMidi(ICamd
, link
,msg
,OUTBUFFERSIZE
-1);
79 while(Midi2Driver_internal(driverdata
,msg
,OUTBUFFERSIZE
-1)==FALSE
) CamdWait();