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

  man pages->IRIX man pages -> dmedia/dmMPEG1AudioEncode (3d)              
Title
Content
Arch
Section
 

Contents


dmMPEG1AudioEncode(3dm)				       dmMPEG1AudioEncode(3dm)


NAME    [Toc]    [Back]

     dmMPEG1AudioEncode	- Compresses a single block of audio data using	MPEG1
     audio compression algorithm.

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/dmedia.h>
     #include <dmedia/dm_audioutil.h>

     DMstatus dmMPEG1AudioEncode(DMMPEG1audioencoder encoder,
					 short *sampBuf,
					 unsigned char *output,
					 int *frameBytes)

PARAMETER    [Toc]    [Back]

     encoder   DMMPEG1audioencoder structure, created by
	       dmMPEG1AudioEncoderCreate(3dm), specifies and stores the	signal
	       processing parameters.  It describes the	kind of	compression to
	       perform,	and holds the between-block state of the compressor.
	       It is initially generated and processed by calls	to
	       dmMPEG1AudioEncoderCreate(3dm) and
	       dmMPEG1AudioEncoderSetParams(3dm), and is modified on each
	       call.


     sampBuf   pointer to input	sample data buffer.  The data format is	short
	       (16-bit).  The samples are assumed to be	two's complement.  The
	       block of	audio data is understood to be
	       DM_AUDIO_CODEC_FRAMES_PER_BLOCK sample frames long, where this
	       is a symbol, which value	is returned by
	       dmMPEG1AudioEncoderGetParams(3dm).  For each call to
	       dmMPEG1AudioEncode(3dm),	DM_AUDIO_CODEC_FRAMES_PER_BLOCK	sample
	       frames long data	must be	provided in the	buffer.


     output    pointer to output data buffer, an array of bytes.  The data
	       format is unsigned char (8-bit).	 It points to a	pre-allocated
	       byte block into which dmMPEG1AudioEncode(3dm) will write	the
	       compressed data for this	block.	The block must be at least
	       DM_AUDIO_CODEC_MAX_BYTES_PER_BLOCK bytes	long, where this is
	       also a symbol, which value is also returned by
	       dmMPEG1AudioEncoderGetParams(3dm).


     frameBytes
	       pointer to an integer return value; indicates the actual	number
	       of compressed bytes written into	the data structure (which will
	       be less than or equal to	DM_AUDIO_CODEC_MAX_BYTES_PER_BLOCK).
	       It is the value returned	by the function.  In the case of some
	       error occuring such as an unrecognized encoder structure, this
	       value is	zero.



									Page 1






dmMPEG1AudioEncode(3dm)				       dmMPEG1AudioEncode(3dm)


RETURNED VALUE    [Toc]    [Back]

     Returns DM_FAILURE	or DM_SUCCESS.

DESCRIPTION    [Toc]    [Back]

     dmMPEG1AudioEncode(3dm) implements	MPEG1 audio compression.

NOTE    [Toc]    [Back]

     compression/decompression delay will be caused by filter operations that
     convolve a	N past input samples with a filter M-coefficient array to
     create N+M-1 output samples.  The filtered	signal contains	more samples
     than the unfiltered signal. the output signal is offset by
     DM_AUDIO_CODEC_FILTER_DELAY samples from the first	sample thus omits the
     last DM_AUDIO_CODEC_FILTER_DELAY samples from the output file.

SEE ALSO    [Toc]    [Back]

      
      
     dmMPEG1AudioEncoderCreate(3dm), dmMPEG1AudioEncoderSetParams(3dm),
     dmMPEG1AudioEncoderGetParams(3dm),	dmMPEG1AudioEncoderDestroy(3dm),
     dmMPEG1AudioDecode(3dm).


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
dmMPEG1AudioHeaderGetParams IRIX get decoder parameter information from a header of any compressed MPEG1 audio data block.
clAddAlgorithm IRIX Add a video or audio compression algorithm to the Compression Library
AFinitcompression IRIX configure the audio compression type and parameters in an AFfilesetup structure for an audio track
dmACConvert IRIX convert audio data format, sampling rate and compression
dmMPEG1AudioEncoderSetParams IRIX set and query MPEG1 audio encoder/decoder parameter values.
dmDVIAudioEncode IRIX compress audio data using the IMA (Interactive Multimedia Association) Recommended ADPCM compression, based on
afInitFormatParams IRIX initialize the audio data format in an AFfilesetup for a specified audio track via dmParams
afSetVirtualFormatParams IRIX set/get the virtual audio data format in an AFfilehandle for a specified audio track via dmParams
datframe IRIX structure of a frame of audio data on Digital Audio Tape (DAT)
AFinitsampfmt IRIX initialize the audio data format in an AFfilesetup for a specified audio track
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service