grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / camd / flushmidi.c
blobc88d1f03510ce96ff6bc354f711641cb93a72aab
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
10 #include <proto/exec.h>
12 #include "camd_intern.h"
15 /*****************************************************************************
17 NAME */
19 AROS_LH1(void, FlushMidi,
21 /* SYNOPSIS */
22 AROS_LHA(struct MidiNode *, midinode, A0),
24 /* LOCATION */
25 struct CamdBase *, CamdBase, 13, Camd)
27 /* FUNCTION
28 Remind me to fill in things here later.
30 INPUTS
32 RESULT
34 NOTES
36 EXAMPLE
38 BUGS
39 Not tested.
41 SEE ALSO
42 GetMidi(), GetSysEx()
44 INTERNALS
46 HISTORY
48 2001-01-12 ksvalast first created
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
54 struct MyMidiNode *mymidinode=(struct MyMidiNode *)midinode;
56 ObtainSemaphore(CB(CamdBase)->CLSemaphore);
57 ObtainSemaphore(&mymidinode->receiversemaphore);
58 mymidinode->unpicked=0;
59 mymidinode->in_curr=mymidinode->in_start;
60 mymidinode->in_curr_get=mymidinode->in_start;
61 mymidinode->error=0;
62 ReleaseSemaphore(&mymidinode->receiversemaphore);
63 ReleaseSemaphore(CB(CamdBase)->CLSemaphore);
65 ObtainSemaphore(&mymidinode->sysexsemaphore2);
66 ObtainSemaphore(&mymidinode->sysexsemaphore);
67 mymidinode->sysex_read=mymidinode->sysex_start;
68 mymidinode->sysex_write=mymidinode->sysex_write;
69 mymidinode->sysex_laststart=mymidinode->sysex_write;
70 ReleaseSemaphore(&mymidinode->sysexsemaphore);
71 ReleaseSemaphore(&mymidinode->sysexsemaphore2);
73 AROS_LIBFUNC_EXIT