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

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

s(3dm)

Contents


afSetVirtualFormatParams(3dm)			 afSetVirtualFormatParams(3dm)


NAME    [Toc]    [Back]

     afSetVirtualFormatParams, afGetVirtualFormatParams	- set/get the virtual
     audio data	format in an AFfilehandle for a	specified audio	track via
     dmParams

SYNOPSIS    [Toc]    [Back]

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

     DMstatus afSetVirtualFormatParams(AFfilehandle file, int track,
				       DMparams	*params)

     DMstatus afGetVirtualFormatParams(AFfilehandle file, int track,
				       DMparams	*params)

PARAMETER    [Toc]    [Back]

     file     is an AFfilehandle structure, previously created by a call to
	      afOpenFile(3dm) or its equivalent.

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

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

     params   a	DMparams list, previously created by a call to
	      dmParamsCreate(3dm).

RETURN VALUE    [Toc]    [Back]

     afSetVirtualFormatParams()	and afGetVirtualFormatParams() return
     DM_SUCCESS	on success, otherwise they return DM_FAILURE.

DESCRIPTION    [Toc]    [Back]

     When a audio data is read from a file into	the application's data buffer
     using afReadFrames(3dm), or written into a	file via afWriteFrames(3dm),
     the format	of the data in the application's buffer	can vary independently
     of	the actual file	data format.  This independent format is call the
     virtual format of the data.  Once some aspect of the virtual data format
     is	set via	one of the above-described routines, the conversion to and
     from the file format into the virtual format happens automatically	and
     transparently.  This allows an application	to choose to ignore the	actual
     file format entirely, and specify only the	format in which	it wants the
     data to appear in the afReadFrames(3dm) buffer.  See afIntro(3dm) for
     more information about the	virtual	format.

     afSetVirtualFormatParams()	sets all virtual parameters associated with
     the audio data in an AFfilehandle structure for an	audio track.  It
     obsoletes the individual routines afSetVirtualSampleFormat(3dm),
     afSetVirtualChannels(3dm),	afSetVirtualRate(3dm), and
     afSetVirtualPCMMapping(3dm).





									Page 1






afSetVirtualFormatParams(3dm)			 afSetVirtualFormatParams(3dm)



     afGetVirtualFormatParams()	allows an application to retrieve the complete
     set of virtual params currently contained within an AFfilehandle
     structure for a given track.

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

     DM_AUDIO_FORMAT	   Sample format.  Must	be DM_AUDIO_TWOS_COMPEMENT,
			   DM_AUDIO_UNSIGNED, DM_AUDIO_FLOAT, or
			   DM_AUDIO_DOUBLE.

     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.

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

     DM_AUDIO_COMPRESSION  Compression type.  Must be left unset or set	to
			   DM_AUDIO_UNCOMPRESSED, since	all data returned via
			   afReadFramesDM_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
			   explanation).

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).

SEE ALSO    [Toc]    [Back]

      
      
     afNewFileSetup(3dm), afOpenFile(3dm), afWriteFrames(3dm),
     afInitFormatParams(3dm), afSetConversionParams(3dm)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
afGetFormatParams IRIX get the audio data format in an AFfilehandle for a specified audio track via dmParams
afInitFormatParams IRIX initialize the audio data format in an AFfilesetup for a specified audio track via dmParams
AFgetsampfmt IRIX get the track / virtual sample format or byte order for a specified audio track from an AFfilehandle structure
AFgetchannels IRIX get the number of interleaved track / virtual channels from an AFfilehandle structure for an audio track
afGetFrameSize IRIX get the track / virtual frame size in bytes for a specified audio track from an AFfilehandle structure
afGetPCMMapping IRIX get the track / virtual PCM mapping values for a specified audio track from an AFfilehandle structure
AFgetrate IRIX get the track/virtual sample rate for a specified audio track from an AFfilehandle structure
afSetVirtualSampleFormat IRIX set the virtual data format for a specified audio track
afSetConversionParams IRIX set/get the parameters associated with format conversion for a specified audio track via dmParams
AFinitsampfmt IRIX initialize the audio data format in an AFfilesetup for a specified audio track
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service