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

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

Contents


ALgetframenumber(3dm)					 ALgetframenumber(3dm)


NAME    [Toc]    [Back]

     ALgetframenumber -	(obsolete) Get the absolute sample frame number
     associated	with a port

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audio.h>

     int ALgetframenumber(const	ALport port, unsigned long long	*fnum)

PARAMETERS    [Toc]    [Back]

     port expects the ALport structure for the audio port for which you	wish
	  to know the sample frame number.  This structure is the returned
	  value	of the ALopenport(3dm) call.

     fnum expects a pointer to an unsigned 64-bit value	which is to contain
	  the resultant	sample-frame number.

DESCRIPTION    [Toc]    [Back]

     ALgetframenumber is obsolete and is provided for backward compatibility.
     The preferred function is alGetFrameNumber(3dm).

     An	audio sample frame is a	group of samples which come into a port	or go
     out of a port simultaneously. For example,	the sample frame for a stereo
     audio port	is a left / right sample pair. Whenever	any audio port is
     open, audio sample	frames are continuously	coming into the	audio device
     and/or going out of the audio device. A count is kept of the number of
     sample frames which come in or go out; this is called the absolute	sample
     frame number for that device.

     For an input port,	ALgetframenumber() returns the absolute	sample frame
     number associated with the	next sample frame to be	read from the port.
     If	the port's queue is in an overflow state, the frame number will	be
     constantly	changing. The application should bring the port	out of
     overflow state by reading or discarding sample frames, then re-examine
     the value of ALgetframenumber.

     For an output port, ALgetframenumber() returns the	absolute sample	frame
     number associated with the	next sample frame to be	written	to the port.
     If	the port's queue is in an underflow state, the frame number will be
     constantly	changing. The application should bring the port	out of
     overflow state by writing samples into it,	then re-examine	the value of
     ALgetframenumber.

     Practically speaking, ALgetframenumber() allows an	application to
     precisely determine when a	port's samples came into the machine or	when
     they will go out, using the sample-frame counter as a timeline. To
     reference this timeline to	the timelines for other	media, the
     ALgetframetime() call should be used as well.

     ALgetframenumber can fail for the following reasons:





									Page 1






ALgetframenumber(3dm)					 ALgetframenumber(3dm)



     AL_BAD_PORT	    port is invalid.

     AL_BAD_NOT_IMPLEMENTED the	feature	is not implemented on the given
			    machine. ALgetframenumber is not implemented on
			    Indigo (IP12), 4D/35 (IP12), and Indigo R4K	(IP20)
			    systems.

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, ALgetframenumber(3dm) returns 0. Otherwise
     ALgetframenumber(3dm) returns -1 and sets an error	number which can be
     retrieved with oserror(3C).

SEE ALSO    [Toc]    [Back]

      
      
     ALopenport(3dm), ALgetframetime(3dm), oserror(3C)
alGetFrameNumber(3dm)					 alGetFrameNumber(3dm)


NAME    [Toc]    [Back]

     alGetFrameNumber -	Get the	absolute sample	frame number associated	with a
     port

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audio.h>

     int alGetFrameNumber(const	ALport port, stamp_t *fnum)

PARAMETERS    [Toc]    [Back]

     port expects the ALport structure for the audio port for which you	wish
	  to know the sample frame number.  This structure is the returned
	  value	of the alOpenPort(3dm) call.

     fnum expects a pointer to an unsigned 64-bit value	which is to contain
	  the resultant	sample-frame number.

DESCRIPTION    [Toc]    [Back]

     Each audio	device on a system counts how many sample frames have come in
     or	gone out of that device. This count is known as	the absolute sample
     frame number for that device. All audio ports connected to	a given	device
     share its absolute	frame number as	a common timeline.

     For an input port,	alGetFrameNumber returns the absolute sample frame
     number associated with the	next sample frame to be	read from the port.
     If	the port's queue is in an overflow state, the frame number will	be
     constantly	changing. The application should bring the port	out of
     overflow state by reading or discarding sample frames, then re-examine
     the value of alGetFrameNumber.

     For an output port, alGetFrameNumber returns the absolute sample frame
     number associated with the	next sample frame to be	written	to the port.
     If	the port's queue is in an underflow state, the frame number will be
     constantly	changing. The application should bring the port	out of
     overflow state by writing samples into it,	then re-examine	the value of
     alGetFrameNumber.

     For ports transferring subcode data, the sample frame number returned by
     alGetFrameNumber corresponds to the sample	frame number of	the last audio
     data sample associated with the subcode frame.

     Practically speaking, alGetFrameNumber allows an application to precisely
     determine when a port's samples came into the machine or when they	will
     go	out, using the sample-frame counter as a timeline. To reference	this
     timeline to the timelines for other media,	or for other audio devices,
     the alGetFrameTime() call should be used as well.

     See the manual page for alGetFrameTime for	a code example illustrating
     how these two calls work.






									Page 1






alGetFrameNumber(3dm)					 alGetFrameNumber(3dm)


DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, alGetFrameNumber returns 0. Otherwise
     alGetFrameNumber returns -1 and sets an error number which	can be
     retrieved with oserror(3C).

     alGetFrameNumber can fail for the following reasons:

     AL_BAD_PORT	    port is invalid.

     AL_BAD_NOT_IMPLEMENTED the	feature	is not implemented on the given
			    machine. alGetFrameNumber is not implemented on
			    Indigo R4K (IP20) systems.

SEE ALSO    [Toc]    [Back]

      
      
     alOpenPort(3dm), alGetFrameTime(3dm), oserror(3C)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
alGetFrameNumber IRIX Get the absolute sample frame number associated with a port
ALgetfillable IRIX (obsolete) report the number of unfilled sample locations in an audio port
ALgetfilled IRIX (obsolete) return the number of filled sample locations in an audio port
ALgetframetime IRIX (obsolete) Get the time at which a sample frame came in or will go out
alGetFillable IRIX report the number of unfilled sample frames in an audio port
alGetFilled IRIX return the number of filled sample frames in an audio port
passthru IRIX pass audio sample data from an input port to an output port
ALgetfloatmax IRIX (obsolete) get/set the maximum value of floating point sample data.
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
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service