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

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

Contents


dmSetAudioDefaults(3dm)				       dmSetAudioDefaults(3dm)


NAME    [Toc]    [Back]

     dmSetAudioDefaults, dmAudioFrameSize - parameters for digital-media audio

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/dm_audio.h>

     DMstatus dmSetAudioDefaults    [Toc]    [Back]
	   ( DMparams* params,
	     int width,
	     double rate,
	     int channels )

     size_t dmAudioFrameSize( const DMparams* params )

DESCRIPTION    [Toc]    [Back]

     dmSetAudioDefaults	sets up	a parameter list with all of the necessary
     parameters	to describe audio for the digital-media	libraries.  The
     parameters	that are set and their values are:  DM_MEDIUM =	DM_AUDIO,
     DM_AUDIO_WIDTH = width, DM_AUDIO_FORMAT = DM_AUDIO_TWOS_COMPLEMENT,
     DM_AUDIO_RATE = rate, DM_AUDIO_CHANNELS = channels, DM_AUDIO_COMPRESSION
     = DM_AUDIO_UNCOMPRESSED.

     dmSetAudioDefaults	returns	DM_SUCCESS if there was	enough memory
     available to set up the parameters, and DM_FAILURE	if not.

     dmAudioFrameSize takes an audio parameter list and	returns	the number of
     bytes needed to store one frame (one sample from each channel).

EXAMPLE    [Toc]    [Back]

	      DMparams*	audioParams;
	      if ( dmParamsCreate( &audioParams	) != DM_SUCCESS	) {
		  printf( "Out of memory.\n" );
		  exit(	1 );
	      }
	      if ( dmSetAudioDefaults( audioParams,
				       16,     /* width	(in bits/sample) */
				       22050,  /* sampling rate	*/
				       2       /* # channels (stereo) */
				       ) != DM_SUCCESS ) {
		  printf( "Out of memory.\n" );
		  exit(	1 );
	      }
	      printf( "%d bytes	per frame.\n",
		      dmAudioFrameSize(	audioParams ) );
	      dmParamsDestroy( audioParams );

SEE ALSO    [Toc]    [Back]

      
      
     dmParams(3dm), dmSetAudioDefaults(3dm).


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
dmSetImageDefaults IRIX parameters for digital-media images
datframe IRIX structure of a frame of audio data on Digital Audio Tape (DAT)
dmTCAddTC IRIX digital media timecode mathematics
dmTCToSeconds IRIX digital media timecode mathematics
dmTCToString IRIX digital media timecode mathematics
dmTCFramesBetween IRIX digital media timecode mathematics
dmnet IRIX Digital Media Network Library
dmTCFramesPerDay IRIX digital media timecode mathematics
annotator IRIX 3D Annotation with Digital Media Notes
CDreadda IRIX read digital audio data from audio CD in CD-ROM
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service