alReadFrames man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



alReadFrames(3dm)					     alReadFrames(3dm)

NAME
     alReadFrames - read interleaved sample frames from an audio port

SYNOPSIS
     #include <dmedia/audio.h>

     int alReadFrames(const ALport port, void *samples, const int framecount)

PARAMETER
     port	  is the audio input port from which you want to read samples.
		  This is the returned value of an alOpenPort(3dm) call.

     samples	  is the buffer into which you want to read the samples.

     framecount	  is the number of sample frames that you want to read from
		  the audio port.

DESCRIPTION
     alReadFrames transfers data from an audio port to the samples buffer.
     alReadFrames blocks until framecount sample frames have been transferred
     to the samples buffer.  If you do not wish to block, make sure that
     framecount is less than the return value of alGetFilled(3dm).

     The format of the data written into samples depends upon the
     configuration of the port. Each sample can be an 8-, 16-, or 32-bit
     integer, or a single- or double-precision floating-point value or subcode
     data; see alSetSampFmt(3dm), alSetFloatMax(3dm) and alSetWidth(3dm) for a
     description of how these formats work. By default, the sample format is
     16-bit integer (short).

     Within each sample frame, alReadFrames provides interleaved data. The
     number of samples per sample frame varies according to the value
     specified by alSetChannels(3dm). By default, the port provides stereo
     data (2 samples per frame).

     In order to achieve the best possible performance, alReadFrames does not
     verify that port or samples are valid. You should make certain these
     values are valid before passing them as arguments to alReadFrames.

EXAMPLE
     The following code fragment opens an audio input port and reads audio
     data from it.

									Page 1

alReadFrames(3dm)					     alReadFrames(3dm)

	  ALport p;
	  short buf[10000];   /* 5000 stereo frames */

	  /* open a port with the default configuration */
	  p = alOpenPort("alReadFrames example","r",0);

	  if (!p) {
	      printf("port open failed:%s\n", alGetErrorString(oserror()));
	  }

	  while (1) {
	      alReadFrames(p, buf, 5000);	  /* read 5000 stereo frames */

	      /* do something here with the audio data */
	  }

DIAGNOSTICS
     alReadFrames always returns 0.

SEE ALSO
     alOpenPort(3dm), alGetFillable(3dm), alGetFilled(3dm),
     alSetChannels(3dm), alSetWidth(3dm), alWriteFrames(3dm),
     alDiscardFrames(3dm), alSetConfig(3dm), alSetQueueSize(3dm),
     alSetSampFmt(3dm), alSetFloatMax(3dm)

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net