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

  man pages->IRIX man pages -> audio/ALnewconfig (3d)              
Title
Content
Arch
Section
 

Contents


ALnewconfig(3dm)					      ALnewconfig(3dm)


NAME    [Toc]    [Back]

     ALnewconfig - create and initialize an audio ALconfig structure

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audio.h>

     ALconfig ALnewconfig(void)    [Toc]    [Back]

DESCRIPTION    [Toc]    [Back]

     ALnewconfig is obsolete and is provided for backward compatibility. The
     preferred function	is alNewConfig(3dm).

     Use ALnewconfig(3dm) to create and	initialize an ALconfig structure. This
     structure is used to pass in configuration	information when calling
     ALopenport(3dm) or	ALsetconfig(3dm).

     To	change the configuration information stored in an ALconfig structure,
     see the commands mentioned	below in SEE ALSO.

     The default structure specifies a 100,000 sample stereo buffer, utilizing
     a 16-bit two's complement sample format.

     When an ALconfig structure	is no longer needed it should be discarded
     with ALfreeconfig(3dm).

     ALnewconfig(3dm) can fail for the following reason:

     AL_BAD_OUT_OF_MEM	 insufficient memory is	available to allocate the
			 ALconfig structure.

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion	ALnewconfig(3dm) returns an opaque ALconfig
     structure initialized to the default values.  If the structure allocation
     fails, ALnewconfig(3dm) returns 0 and sets	an error number	which can be
     retrieved with oserror(3C).

SEE ALSO    [Toc]    [Back]

      
      
     ALfreeconfig(3dm),	ALqueuesize(3dm), ALsetwidth(3dm), ALsetchannels(3dm),
     ALopenport(3dm), ALsetconfig(3dm),	ALgetconfig(3dm), oserror(3C)
















									Page 1






alNewConfig(3dm)					      alNewConfig(3dm)


NAME    [Toc]    [Back]

     alNewConfig - create and initialize an audio ALconfig structure

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audio.h>

     ALconfig alNewConfig(void)    [Toc]    [Back]

DESCRIPTION    [Toc]    [Back]

     alNewConfig creates and initializes an ALconfig structure.	 An ALconfig
     structure specifies the audio data	format and queue size to be used by an
     audio port.  The functions	alOpenPort(3dm)	or alSetConfig(3dm) apply the
     properties	specified in the ALconfig to a new or existing audio port,
     respectively.

     To	change the properties given in an ALconfig structure, see the commands
     mentioned below in	SEE ALSO.

     The default ALconfig specifies a 50,000 sample-frame stereo buffer,
     utilizing a 16-bit	two's complement sample	format.

     When an ALconfig structure	is no longer needed it should be discarded
     with alFreeConfig(3dm).

EXAMPLE    [Toc]    [Back]

     The following code	fragment shows how to use an ALconfig to create	an
     audio port	which provides floating-point data.

	  ALconfig c;
	  ALport p;

	  /* Create a config. This defaults to stereo, 16-bit integer data */
	  c = alNewConfig();
	  if (!c) {
	      printf("Couldn't create ALconfig:%s\n", alGetErrorString(oserror()));
	      exit(-1);
	  }

	  /* Specify single-precision floating-point data instead */
	  alSetSampFmt(c, AL_SAMPFMT_FLOAT);

	  /* Now attempt to open an audio input	port using this	config */
	  p = alOpenPort("ALconfig example", "r", c);

	  if (!p) {
	      printf("Couldn't open an audio port:%s\n", alGetErrorString(oserror()));
	      exit(-1);
	  }

	  /*
	   * We've now got an input port giving	us floating-point data.	If we
	   * no	longer need the	ALconfig, we should free it with alFreeConfig(c);



									Page 1






alNewConfig(3dm)					      alNewConfig(3dm)



	   */


DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, alNewConfig returns an	opaque ALconfig
     structure initialized to the default values.  If the structure allocation
     fails, alNewConfig	returns	0 and sets an error number which can be
     retrieved with oserror(3C).

     alNewConfig can fail for the following reason:

     AL_BAD_OUT_OF_MEM	 insufficient memory is	available to allocate the
			 ALconfig structure.

SEE ALSO    [Toc]    [Back]

      
      
     alFreeConfig(3dm),	ALqueuesize(3dm), alSetWidth(3dm), alSetChannels(3dm),
     alOpenPort(3dm), alSetConfig(3dm),	alGetConfig(3dm), oserror(3C)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
alNewEvent IRIX create and initialize an audio ALevent structure
ALgetconfig IRIX (obsolete) get/set the ALconfig structure of an audio ALport structure
alFreeConfig IRIX deallocates an audio ALconfig structure
alGetDevice IRIX get/set the device setting in an audio ALconfig structure
ALfreeconfig IRIX (obsolete) deallocates an audio ALconfig structure
ALgetchannels IRIX (obsolete) get/set the channel setting in an audio ALconfig structure
alGetSampFmt IRIX get/set the sample format setting in an audio ALconfig structure
ALgetwidth IRIX (obsolete) get/set the sample width setting in an audio ALconfig structure
ALgetsampfmt IRIX (obsolete) get/set the sample format setting in an audio ALconfig structure
ALgetqueuesize IRIX (obsolete) get/set audio port buffer size information in an ALconfig structure
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service