Tabs to spaces, more consistent formatting.
[AROS.git] / workbench / libs / camd / waitmidi.c
blob6e5e9d71baddab7e7fe1da1e32cd57cd1de918a2
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <proto/exec.h>
10 #include <proto/camd.h>
12 #include "camd_intern.h"
14 #undef WaitMidi
16 /*****************************************************************************
18 NAME */
20 AROS_LH2(BOOL, WaitMidi,
22 /* SYNOPSIS */
23 AROS_LHA(struct MidiNode *, midinode, A0),
24 AROS_LHA(MidiMsg *, msg, A1),
26 /* LOCATION */
27 struct CamdBase *, CamdBase, 25, Camd)
29 /* FUNCTION
30 Waits until a new message is received at the node, and
31 copy the message to msg.
33 INPUTS
34 msg - Pointer to a midimessage where the message will be copied.
36 RESULT
37 Returns TRUE if a new message arrived or had arrived, FALSE, if there
38 was en error on the midinode.
40 NOTES
42 EXAMPLE
44 BUGS
46 SEE ALSO
47 GetMidi()
49 INTERNALS
51 HISTORY
53 2001-01-12 ksvalast first created
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
59 struct MyMidiNode *mymidinode=(struct MyMidiNode *)midinode;
60 if(mymidinode->error!=0) return FALSE;
62 Wait(1L<<midinode->mi_ReceiveSigBit);
64 GetMidi(midinode,msg);
66 return TRUE;
68 AROS_LIBFUNC_EXIT