.TH MidiPlayInit 3  "The Droid Works"
.UC 4
.SH NAME
\fLMidiPlayInit\fR \- get the midi device ready to play
.SH SYNOPSIS
.ft L
cc ... -lmidi
.br
#include <midi.h>
.ft R
.sp
.ft L
.ft L

\fBMidiPlayInit\fP\fR (\fLfile\fP, \fLnumtracks\fP, \fLmode\fP) 
.ft R
.na
.nf
.in +5
char *\fLfile\fP;
int \fLnumtracks\fP, \fLmode\fP;
.in -5
.fi
.ft R

Initialize midi device for playing on some number of tracks.
If \fLfile\fP is given, it contains ascii initialization commands
which are written to the device.
Otherwise a default sequence is sent (set track 0, clear play, \fLmode\fP).
The open midi file descriptor is returned,
or 0 if there was an error.
\fLnumtracks\fP tells how many of the 8 available midi tracks
will be used.
\fLmode\fP is one of: \fLMPU_START_PLAY\fP, \fLMPU_START_RECORD\fP,
or \fLMPU_START_OVERDUB\fP.
\fIBugs:\fP the initialization of multiplay tracks is not yet
known to be robust... Also, note that \fLMidiPlayInit\fP does
an \fLMPU_START_mode\fP, so don't wait too long before transmitting
play buffers.
.in +5

.in -5
.ft R
.SH AUTHOR
Michael Hawley, Lucasfilm Ltd.
(dagobah!mike)
