Gives the Midi port state. The switching on or off of Midi ports is controlled by the MidiSetPortState and MidiGetPortState routines. These must be used with care since they affect all the applications.
pascal Boolean MidiGetPortState(short port);
port
- a port number from 0 to 255.
The result is true if the port is open or false if the port is closed.
Print the state of all the Midi ports.
void PrintPortsState(void) { short i; printf( "Midi ports state :\n"); for( i = 0; i < 256; ++i ) { if ( MidiGetPortState( i ) ) printf(" %i is open \n", i ); else printf(" %i is closed \n", i ); } }
On the Atari, there is just one Midi port (port 0), and on the Macintosh there are just two ports (port modem: 0, port printer: 1). But the future LAN version of MidiShare will allow up to 256 ports to be used. Therefore, applications must consider that 256 ports are available.