2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
9 #include <proto/exec.h>
11 #include "camd_intern.h"
13 /*****************************************************************************
17 AROS_LH2(BOOL
, GetMidi
,
20 AROS_LHA(struct MidiNode
*, midinode
, A0
),
21 AROS_LHA(MidiMsg
*, msg
, A1
),
24 struct CamdBase
*, CamdBase
, 24, Camd
)
27 Gets a message from a midinodes buffer.
30 midinode - pointer to midinode
31 msg - The message is removed from the internal buffer and copied into msg.
34 TRUE if message was copied, FALSE if buffer was empty.
49 2001-01-12 ksvalast first created
51 *****************************************************************************/
55 struct MyMidiNode
*mymidinode
=(struct MyMidiNode
*)midinode
;
58 if(mymidinode
->unpicked
==0){
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
;