posixc.library: convert path unix2amiga in rmdir before passing to stdcio remove
[AROS.git] / workbench / libs / camd / getmidi.c
blob6ab59000ca65aafc140adc81718c0d511dd40828
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>
11 #include "camd_intern.h"
13 /*****************************************************************************
15 NAME */
17 AROS_LH2(BOOL, GetMidi,
19 /* SYNOPSIS */
20 AROS_LHA(struct MidiNode *, midinode, A0),
21 AROS_LHA(MidiMsg *, msg, A1),
23 /* LOCATION */
24 struct CamdBase *, CamdBase, 24, Camd)
26 /* FUNCTION
27 Gets a message from a midinodes buffer.
29 INPUTS
30 midinode - pointer to midinode
31 msg - The message is removed from the internal buffer and copied into msg.
33 RESULT
34 TRUE if message was copied, FALSE if buffer was empty.
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 WaitMidi()
45 INTERNALS
47 HISTORY
49 2001-01-12 ksvalast first created
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 struct MyMidiNode *mymidinode=(struct MyMidiNode *)midinode;
56 MidiMsg *mymsg;
58 if(mymidinode->unpicked==0){
59 return FALSE;
61 mymsg=mymidinode->in_curr_get;
63 msg->mm_Msg=mymsg->mm_Msg;
64 msg->mm_Time=mymsg->mm_Time;
66 mymidinode->unpicked--;
68 mymidinode->in_curr_get++;
69 if(mymidinode->in_curr_get==mymidinode->in_end){
70 mymidinode->in_curr_get=mymidinode->in_start;
73 if(msg->mm_Status==0xf0)
74 mymidinode->sysex_nextis0=FALSE;
76 mymidinode->lastreadstatus=msg->mm_Status;
78 return TRUE;
80 AROS_LIBFUNC_EXIT