*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> midi/mdInit (3d)              


mdInit(3dm)							   mdInit(3dm)

NAME    [Toc]    [Back]

     mdInit, mdRegister, mdUnRegister  - initialize MIDI system	and register
     new interfaces

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/midi.h>

     int mdInit(void);
     char *mdRegister(const char *name);
     int mdUnRegister(const char *name);

DESCRIPTION    [Toc]    [Back]

     mdInit initializes	the MIDI library and returns the current number	of
     configured	MIDI interfaces.  mdInit must be called	before the application
     calls any other MIDI library routines.  mdInit returns 0 if no interfaces
     are configured.

     An	application may	call mdInit multiple times to update the MIDI
     library's internal	list of	available ports.  Any interfaces configured
     after the initial call to mdInit will be inaccessible by the application
     until mdInit is called again; long-running	applications which maintain a
     list of active devices should call	mdInit periodically to insure that
     their device list is up-to-date.  Calling mdInit multiple times has no
     effect on previously opened ports.

     mdRegister	creates	a new internal MIDI interface named name.  If an
     interface with the	requested name is already configured, mdRegister will
     generate a	new unique name	for the	port and return	the unique name	(this
     is	done by	appending a digit onto the end of the name). mdRegister
     returns the name of the device or NULL in event of	an error.

     mdUnRegister removes the internal MIDI interface indicated	by name.
     mdUnRegister returns 0 if the interface is	successfully removed.  If an
     error occurs, -1 will be returned instead.	 Internal interfaces must be
     explicitly	unregistered when an application is finished with them;	they
     are a limited resource and	are not	released when the application which
     originally	created	them exits.

RETURN VALUES    [Toc]    [Back]

     mdInit returns the	number of valid	devices	on the system or -1 on

     mdRegister	returns	the name used for the new interface; if	the
     registration fails, NULL is returned.  The	storage	for the	returned name
     is	allocated by malloc.  The caller should	call free() when it is done
     with the name.

     mdUnRegister returns 0 on success;	if it fails, it	returns	-1.

									Page 1

mdInit(3dm)							   mdInit(3dm)

SEE ALSO    [Toc]    [Back]


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
amregister IRIX register or deregister the system
inittodr OpenBSD initialize system time
VFS_INIT FreeBSD initialize a file system
inittodr FreeBSD initialize system time
inittodr NetBSD initialize system time
intro FreeBSD introduction to system kernel interfaces
vm_set_page_size FreeBSD initialize the system page size
VkHelpPane IRIX A menu pane that interfaces to the ViewKit help system
altq OpenBSD kernel interfaces for manipulating output queues on network interfaces
altq NetBSD kernel interfaces for manipulating output queues on network interfaces
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service