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

  man pages->IRIX man pages -> audiofile/AFgetinstids (3d)              
Title
Content
Arch
Section
 

Contents


afGetInstIDs(3dm)					     afGetInstIDs(3dm)


NAME    [Toc]    [Back]

     afGetInstIDs - get	a list of instrument configurations from an
     AFfilehandle

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audiofile.h>

     int afGetInstIDs(AFfilehandle file, int *instids)

PARAMETER    [Toc]    [Back]

     file      expects an AFfilehandle structure, created when an audio	file
	       was opened by a call to afOpenFile(3dm).

     instids   an array	of integer locations used to return a list of (unique)
	       positive	instrument ID's	which can be used to reference the
	       sampler configurations in a file.  For an AIFF/AIFF-C file,
	       this array will return the ID AF_DEFAULT_INST if	there is an
	       instrument chunk.  If you pass a	null instids array to
	       afGetInstIDs(), it simply returns the number of sampler
	       configurations stored in	the audio file.

RETURN VALUE    [Toc]    [Back]

     afGetInstIDs() returns a nonnegative integer count	of the number of
     instrument	configurations in the file, or -1 in case of error.

     For AIFF-C	and AIFF files,	this value is always either 0 or 1.  The value
     varies in other file formats, so it is important to use this routine to
     check the inst count prior	to handing it a	pointer	to an array.

DESCRIPTION    [Toc]    [Back]

     Typically,	afGetInstIDs() is called twice.	 The first time	you pass it a
     null instids array, and just check	the return value. The return value
     tells you how large an instids array to allocate, which you in turn pass
     back to afGetInstIDs() to obtain a	list of	unique positive	instrument ID
     values.  You can then use these ID's to reference the various instrument
     configurations in the file.

     For example, you pass an instrument ID to afGetInstParamLong(3dm) to
     obtain the	values of the individual instrument parameters such as gain,
     base note,	and velocity range.

CAVEATS    [Toc]    [Back]

     This function may return more than	one inst, unlike the one fixed INST in
     AIFF/AIFF-C files.	 Other currently supported file	formats	have different
     inst configurations than AIFF/AIFF-C.

     In	the case of INST parameters it is important to be able to query	at
     runtime the capabilities of a given file format.  An application can use
     afQuery(3dm) to determine whether a given file format supports INST
     chunks, and if so,	the maximum number allowed.  Apps should also be
     written to	expect and ignore instrument configurations or instrument
     parameters	they do	not understand.



									Page 1






afGetInstIDs(3dm)					     afGetInstIDs(3dm)


SEE ALSO    [Toc]    [Back]

      
      
     afOpenFile(3dm),  afInitInstIDs(3dm), afGetInstParamLong(3dm)
afGetInstIDs(3dm)					     afGetInstIDs(3dm)


NAME    [Toc]    [Back]

     afGetInstIDs - get	a list of instrument configurations from an
     AFfilehandle

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audiofile.h>

     int afGetInstIDs(AFfilehandle file, int *instids)

PARAMETER    [Toc]    [Back]

     file      expects an AFfilehandle structure, created when an audio	file
	       was opened by a call to afOpenFile(3dm).

     instids   an array	of integer locations used to return a list of (unique)
	       positive	instrument ID's	which can be used to reference the
	       sampler configurations in a file.  For an AIFF/AIFF-C file,
	       this array will return the ID AF_DEFAULT_INST if	there is an
	       instrument chunk.  If you pass a	null instids array to
	       afGetInstIDs(), it simply returns the number of sampler
	       configurations stored in	the audio file.

RETURN VALUE    [Toc]    [Back]

     afGetInstIDs() returns a nonnegative integer count	of the number of
     instrument	configurations in the file, or -1 in case of error.

     For AIFF-C	and AIFF files,	this value is always either 0 or 1.  The value
     varies in other file formats, so it is important to use this routine to
     check the inst count prior	to handing it a	pointer	to an array.

DESCRIPTION    [Toc]    [Back]

     Typically,	afGetInstIDs() is called twice.	 The first time	you pass it a
     null instids array, and just check	the return value. The return value
     tells you how large an instids array to allocate, which you in turn pass
     back to afGetInstIDs() to obtain a	list of	unique positive	instrument ID
     values.  You can then use these ID's to reference the various instrument
     configurations in the file.

     For example, you pass an instrument ID to afGetInstParamLong(3dm) to
     obtain the	values of the individual instrument parameters such as gain,
     base note,	and velocity range.

CAVEATS    [Toc]    [Back]

     This function may return more than	one inst, unlike the one fixed INST in
     AIFF/AIFF-C files.	 Other currently supported file	formats	have different
     inst configurations than AIFF/AIFF-C.

     In	the case of INST parameters it is important to be able to query	at
     runtime the capabilities of a given file format.  An application can use
     afQuery(3dm) to determine whether a given file format supports INST
     chunks, and if so,	the maximum number allowed.  Apps should also be
     written to	expect and ignore instrument configurations or instrument
     parameters	they do	not understand.



									Page 1






afGetInstIDs(3dm)					     afGetInstIDs(3dm)


SEE ALSO    [Toc]    [Back]

      
      
     afOpenFile(3dm),  afInitInstIDs(3dm), afGetInstParamLong(3dm)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
AFgetinstparamlong IRIX get / set a parameter list / long parameter value for an instrument configuration in an AFfilehandle structure
AFgetloopids IRIX get a number and list of loop ID's for an instrument configuration
AFinitloopids IRIX initialize a list of loop ID's for a given instrument in an AFfilesetup structure
glxgetfbconfigs IRIX list all GLX frame buffer configurations for a given screen
AFinitinstids IRIX specify a list of instrument parameter chunk identifiers to be stored in an AFfilesetup structure.
glxchoosefbconfigsgix IRIX return a list of GLX frame buffer configurations that match the specified attributes
glxchoosefbconfig IRIX return a list of GLX frame buffer configurations that match the specified attributes
AFgettrackids IRIX get the list of track descriptor id's for the given AFfilehandle
kconfig HP-UX manage kernel configurations
printconfig Tru64 Used to add, delete, or modify printer configurations
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service