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

  man pages->IRIX man pages -> audiofile/afInitFormatParams (3d)              


afInitFormatParams(3dm)				       afInitFormatParams(3dm)

NAME    [Toc]    [Back]

     afInitFormatParams	- initialize the audio data format in an AFfilesetup
     for a specified audio track via dmParams

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/dm_audio.h>
     #include <dmedia/audiofile.h>

     DMstatus afInitFormatParams(AFfilesetup setup, int	track,
				 DMparams *params)

PARAMETER    [Toc]    [Back]

     setup    is an AFfilesetup	structure, previously created by a call	to

     track    is an integer which identifies an	audio track in setup.

	      Since all	currently supported file formats contain only one
	      audio track, the value AF_DEFAULT_TRACK should be	used here for

     params   a	DMparams list, previously created by a call to

RETURN VALUE    [Toc]    [Back]

     afInitFormatParams() returns DM_SUCCESS on	success, otherwise it returns

DESCRIPTION    [Toc]    [Back]

     afInitFormatParams() initializes all parameters associated	with the audio
     data in an	AFfilesetup structure for an audio track.  It obsoletes	the
     individual	routines afInitSampleFormat(3dm), afInitChannels(3dm),
     afInitRate(3dm) and afInitCompression(3dm), and

     The following parameters are defined in dmedia/dm_audio.h and may be set
     via params:

     DM_AUDIO_FORMAT	   Sample format.  Must	be DM_AUDIO_TWOS_COMPLEMENT,

     DM_AUDIO_WIDTH	   Sample width	in bits.  For integer sample formats,
			   it must be an integer value between 1 and 32,
			   inclusive.  For formats DM_AUDIO_FLOAT and
			   DM_AUDIO_DOUBLE, this parameter is ignored.

     DM_AUDIO_CHANNELS	   Channel count.  Integer value greater than or equal
			   to 1.

									Page 1

afInitFormatParams(3dm)				       afInitFormatParams(3dm)

     DM_AUDIO_RATE	   Sampling rate.  Must	be a positive, double
			   precision floating point value.

     DM_AUDIO_COMPRESSION  Compression type.  Will be DM_AUDIO_UNCOMPRESSED or
			   one of the supported	compression parameter values.
			   In addition,	any parameters associated with the
			   compression,	such as	DM_AUDIO_BITRATE, should be
			   set here (see afInitCompression(3dm)	and

     DM_AUDIO_PCM_MAP_SLOPE    [Toc]    [Back]

     DM_AUDIO_PCM_MAP_INTERCEPT    [Toc]    [Back]

     DM_AUDIO_PCM_MAP_MAXCLIP    [Toc]    [Back]

     DM_AUDIO_PCM_MAP_MINCLIP    [Toc]    [Back]
			   Slope, intercept, minimum and maximum clipping
			   values for PCM mapping (see
			   afGetVirtualPCMMapping(3dm) for a detailed

     When a file is opened for writing by passing setup	to afOpenFile(3dm),
     the track will be configured to store data	according to the data format,
     width, number of channels,	or sample rate specified.

CAVEATS    [Toc]    [Back]

     The Audio File Library will continue to support additional	file formats.
     The ability of these file formats to store	data of	various	sample formats
     will vary.	 If you	are choosing a file format other than the default
     format, you should	make sure that you either explicitly specify format
     params for	this file's tracks which are compatible	with that file format,
     or	do not set them	at all (in which case they will	be set to default
     values for	the format).

     In	the case where the audio track in a file is configured for
     compression, the parameter	values for DM_AUDIO_FORMAT and DM_AUDIO_WIDTH
     should match the data format specified by the compression algorithm.  For
     example, the software G.722 compressor expects to encode 16-bit two's
     complement	linear PCM input data.	In addition, many compression formats
     have restrictions on sample rate and/or channel count as well.

SEE ALSO    [Toc]    [Back]

     afNewFileSetup(3dm), afOpenFile(3dm), afWriteFrames(3dm),
     afSetVirtualSampleFormat(3dm), afGetVirtualSampleFormat(3dm),

									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
AFinitsampfmt IRIX initialize the audio data format in an AFfilesetup for a specified audio track
afSetVirtualFormatParams IRIX set/get the virtual audio data format in an AFfilehandle for a specified audio track via dmParams
afGetFormatParams IRIX get the audio data format in an AFfilehandle for a specified audio track via dmParams
AFinittrackids IRIX initialize the list of audio track identifiers in an AFfilesetup structure.
afSetConversionParams IRIX set/get the parameters associated with format conversion for a specified audio track via dmParams
AFinitcompression IRIX configure the audio compression type and parameters in an AFfilesetup structure for an audio track
AFinitfilefmt IRIX initialize the audio file format type in an AFfilesetup structure
afSetVirtualSampleFormat IRIX set the virtual data format for a specified audio track
afInitPCMMapping IRIX configure the PCM mapping for an audio track in an AFfilesetup structure
AFgetsampfmt IRIX get the track / virtual sample format or byte order for a specified audio track from an AFfilehandle structure
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service