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

  man pages->IRIX man pages -> dmedia/dmAudioRateConvert (3d)              


dmAudioRateConvert(3dm)				       dmAudioRateConvert(3dm)

NAME    [Toc]    [Back]

     dmAudioRateConvert	- convert data sampling	rate.  It consumes an input
     buffer of floats and generates an output buffer of	floats.

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/dm_audioutil.h>

     DMstatus dmAudioRateConvert(DMaudiorateconverter handle,
			     float *inbuf, float *outbuf, int inlen,
			     int *numout)

PARAMETER    [Toc]    [Back]

     handle    DMaudiorateconverter structure, created by
	       dmAudioRateConverterCreate(3dm),	specifies the signal
	       processing parameters.

     inbuf     pointer to input	data buffer.  The converter does not alter the
	       contents	of this	buffer.	 The data format is currently limited
	       to single channel, 32-bit floating point.

     outbuf    pointer to output data buffer.  Ensure that inbuf and outbuf do
	       not overlap.  The data format is	currently limited to single
	       channel,	32-bit floating	point.	Sampling rate conversion
	       alters the length of the	data. dmAudioRateConvert will output
	       inlen * (output rate / input rate) samples.

     inlen     length of the input buffer must be a multiple of
	       DM_AUDIO_RC_ATOMIC_IN_LENGTH, dependent on the conversion
	       parameters and cab be acquired with dmParamsGetFloat(3dm),
	       dmAudioRateConverterSetParams(3dm), or

     numout    # input sample frames numout this iteration, pass by reference.
	       null (0)	value ok.

RETURNED VALUE    [Toc]    [Back]

     Returns DM_FAILURE	or DM_SUCCESS.

DESCRIPTION    [Toc]    [Back]

     dmAudioRateConvert(3dm) attempts to convert inlen samples.	inlen must be
     of	a multiple M of	DM_AUDIO_RC_ATOMIC_IN_LENGTH.  The application program
     must malloc DM_AUDIO_RC_ATOMIC_IN_LENGTH *	M samples for inbuf and
     DM_AUDIO_RC_ATOMIC_OUT_LENGTH * M samples for outbuf for any M >= 1
     (chosen by	the application).  DM_AUDIO_RC_ATOMIC_IN_LENGTH	* M samples

									Page 1

dmAudioRateConvert(3dm)				       dmAudioRateConvert(3dm)

     are numout	into DM_AUDIO_RC_ATOMIC_OUT_LENGTH * M samples.	 The actual
     value of samples returned in outbuf by a given call to dmAudioRateConvert
     may be slightly less than DM_AUDIO_RC_ATOMIC_OUT_LENGTH * M, and is
     returned in numout.  dmAudioRateConvert will return DM_FAILURE if it is
     called with a value of "inlen" which is not a multiple M of
     DM_AUDIO_RC_ATOMIC_IN_LENGTH.  It will return DM_SUCCESS in all other

     The application will want to discard the first DM_AUDIO_RC_GROUP_DELAY
     samples returned in outbuf	from dmAudioRateConvert.  See further
     discussion	in dmAudioRateConverterGetParams(3dm).

     The application may want to flush out an additional
     DM_AUDIO_RC_GROUP_DELAY samples from dmAudioRateConvert after feeding in
     all the input data	to be converted.  This flushing	operation is performed
     by	calling	dmAudioRateConvert with	a value	inlen =	h *
     corresponding inbuf will typically	be bzero'd, although the values	in
     inbuf probably don't matter).

     To	clear the internal buffers used	converter, call

NOTE    [Toc]    [Back]

     dmParamsGetFloat(3dm), dmAudioRateConverterSetParams(3dm),
     dmAudioRateConverterGetParams(3dm), dmAudioRateConverterReset(3dm).

									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
dmACConvert IRIX convert audio data format, sampling rate and compression
dmACGetMinInputSize IRIX auxiliary routines for querying input and output buffer sizes for dmACConvert.
VerifyData Tru64 Verify input buffer data (CDSA)
CSP_VerifyData Tru64 Verify input buffer data (CDSA)
CSSM_VerifyData Tru64 Verify input buffer data (CDSA)
CSP_SignDataUpdate Tru64 Continue the staged signing process input buffer data (CDSA)
CSSM_SignDataUpdate Tru64 Continue the staged signing process input buffer data (CDSA)
SignDataUpdate Tru64 Continue the staged signing process input buffer data (CDSA)
SSL_peek Tru64 Copy the data in the SSL buffer into the buffer passed to this API
aifcresample IRIX perform sampling rate conversion on an AIFF-C file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service