AuCreateRecord(3X)
NAME
AuCreateRecord − create an audio record widget
SYNOPSIS
extern Widget
AuCreateRecord (
Widget parent,
String ∗ name,
ArgList ∗ arglist,
Cardinal argcount);
DESCRIPTION
AuCreateRecord() creates a record widget.
If you use the streams facility, the toolkit creates a file descriptor in connectFd during AuInvokeRecord(). After calling AuInvokeRecord(), retrieve the file descriptor by calling XtSetArg(args[0], AuNconnectFd, &stream_fd); and then call XtGetValue(recordWidget,args,1);. Then, use the OS select, read, and write calls.
After calling AStopAudio() to stop the transaction, the application program must retrieve all the data in the buffer and close the file descriptor. A callback routine for AuNStopped may include all of these operations.
Note that for a record streams operation to work, a callback routine for AuNdataAvailable must be added using AtAddCallback().
To enable an application to use a widget after it is created, bind the widget library with the application as follows: ld my_file.o... -lAt -lAlib
parent Name of the parent widget
name Name for this widget
arglist The argument list for the widget
argcount The number of arguments in arglist.
arglist may contain the following:
gain Volume, in per cent of total gain. Acceptable values are from 0 to 100. Default is 70.
fileFormat Audio file format. Acceptable values are:
AuFMulaw AuFAlaw
AuFLinear16 AuFSun
AuFLinear8 AuFRiff
AuFMac AuFLinear8Offset
AuFUnknown
Default is AuFUnknown.
dataFormat Audio data format. Acceptable values are:
AuDMulaw AuDAlaw
AuDLinear16 AuDLinear8
AuDLinear8Offset AuDUnknown
Default is AuDUnknown.
durationType Duration units. Acceptable values are:
AuSamples AuMilliseconds
AuFullLength
Default is AuFullLength.
duration Number of units to record. Acceptable values are -1 to max_int. Default is ~0 (-1, record until notified).
fileName Name of the file to receive the data (must be set prior to invocation of the record widget.) There is no default value.
startTimeType Type of start time unit. Acceptable values are AuSamples and AuMilliseconds. Default is AuMilliseconds.
startTime Number of units into the file to begin recording. Acceptable values are 0 to max_int. Default value is 0 (BOF).
pause Start in paused state. Acceptable values are ON or OFF. Default is OFF.
stop Stop mode. Acceptable values are:
AuStopLinkTrans AuStopThisTrans
AuStopEndLoopTrans AuStopNone
Default is AuStopNone.
audioConnection Pointer to Audio structure for this connection, returned by AOpenAUdio(). Specifying a valid pointer for this argument is mandatory; the default value is NULL, which will cause the program to fail.
streamOrFile Source of audio data. Acceptable values are AuStream or AuFile. Default is AuFile.
sStream Pointer to SStream structure for this AuStream-type widget. Specifying a valid pointer for this argument is mandatory; the default value is NULL, which will cause the program to fail.
connectFd File descriptor of the non-blocking connection made for the stream by the toolkit; created during AuInvokeRecord().
reserved
writeMode Mode for saving data. Acceptable values are:
AuOverWrite AuTruncAppend
AuInsert
Default is AuOverWrite.
RETURN VALUE
Upon successful completion, AuCreateRecord() returns the widget ID.
ERRORS
AuCreateRecord() does not return an error status.
DEPENDENCIES
This function belongs to the Audio Application Program Interface widget library. The audio server must run on a system that has audio hardware. To find out whether or not your system has audio hardware, refer to the hardware manual that accompanies your system.
AUTHOR
AuCreateRecord() was developed by HP.
SEE ALSO
AtAddCallback(), AtInitialize(), AuCreatePlay(), AuInvokePlay(), AuInvokeRecord().
Using the Audio Application Program Interface.
Hewlett-Packard Company — HP-UX Release 8.07: November 1991