AFRecordSamples(3)					   AFRecordSamples(3)



NAME
  AFRecordSamples - record audio

SYNTAX
  #include <AF/AFlib.h>
  #include <AF/AFUtils.h>

  ATime	AFRecordSamples	(AC ac,	ATime startTime, int nbytes,
					  unsigned char	*buf, ABool block)

ARGUMENTS

  ac	    Record from	the audio device specified by the audio	context.

  startTime Specifies the audio	device time at which to	record the first sam-
	    ple.

  nbytes    The	number of bytes	(not samples) of audio data to record.

  buf	    A pointer to a buffer to hold the audio data.

  block	    Specifies blocking or non-blocking:	 must be ABlock	or ANoBlock.


DESCRIPTION
  The AFRecordSamples function will retrieve nbytes of data from the audio
  server at the	specified time and store the data in buf.  AFRecordSamples
  returns the current device time.

  If part or all of the	request	spans into the future and the block parameter
  is ABlock, this function will	block until all	of the requested data is
  available.  If block is ANoBlock, the	function will return immediately with
  whatever data	is available (the caller must look at the return time to fig-
  ure out how many samples were	returned).

  The encoding type, number of channels, and endian-ness of the	record data
  are specified	in the audio context.  The block size specified	by nbytes
  must be a unit size of the encoding type.

SEE ALSO
  AFGetTime(3),	AFPlaySamples(3), AFCreateAC(3), AF_samples_sizes(3),
  AFChangeACAttributes(3), AAudioDeviceDescriptor(3), AF(1)

BUGS
  If you encounter a reproducible bug, please submit a problem report to
  (af-bugs@crl.dec.com).

COPYRIGHT
  Copyright 1990-1994, Digital Equipment Corporation.
  See AF(1) for	a full statement of rights and permissions.



AUTHORS
  Digital Cambridge Research Lab