Gives the state of a connection between two MidiShare applications. Connections allow real-time communications of midi events between applications.
![]()
pascal Boolean MidiIsConnected(short src, short dest);
![]()
src- is the reference number of a source application
dest- is the reference number of a destination application
![]()
The result is true when a connection exist between the source and the destination, and false otherwise.
Print all the sources of an application.
void PrintSources(short refNum)
{
short src;
short i;
printf( "Sources of : %s\n", MidiGetName( refNum) );
for( i = 1; i <= MidiCountAppls(); ++i )
{
src = MidiGetIndAppl(i);
if ( MidiIsConnected(src, refNum) )
printf(" %i : %s \n", src, MidiGetName( src ) );
}
}
MidiShare was originally developed for Pascal on the Macintosh. Consequently, the result of MidiGetName is a Pascal string that must be converted to a C string to be printed.