ARecordSStream(3X) — Series 700 Only
NAME
ARecordSStream − initiate transaction; return transaction ID and SStreams structure
SYNOPSIS
#include <audio/Alib.h>
ATransID ARecordSStream(
Audio *audio,
AudioAttrMask attr_mask,
AudioAttributes *audio_attributes,
SSRecordParams *rp,
SStream *sstream_return,
long *status_return
);
DESCRIPTION
ARecordSStream() initiates a sound stream record transaction and returns a transaction ID and an SStream structure that contains a TCP socket address.
The application connects the socket it has created to the TCP address. The record operation begins immediately or in pause mode, depending on the pause_first field in SSRecordParams. The record stream transaction can be controlled using APauseAudio(), AResumeAudio(), and AStopAudio().
audio specifies the Audio structure associated with this connection.
attr_mask specifies which elements of the audio_attributes structure to use; it is the bitwise inclusive OR of the valid audio attribute masks.
If attr_mask is zero, the values in the AudioAttributes structure returned by ABestAudioAttributes() are used.
audio_attributes contains values for type and sampled attributes. Type must be set, separate from the mask.
If audio_attributes is NULL, the values in the AudioAttributes structure returned by ABestAudioAttributes() are used; values in this structure are also used for unspecified attributes.
rp specifies the record parameters associated with the record operation.
sstream_return receives the returned SStream structure.
status_return receives the returned status of the operation unless it is set to NULL.
RETURN VALUE
Upon successful completion, ARecordSStream() returns a transaction ID.
ERRORS
If status_return is not set to NULL, one of the following is returned in status_return:
0 AENoError
2 AEBadAudio
7 AEBadDataFormat
10 AEBadGainMatrix
13 AEBadAttribute
EXAMPLES
The following example starts a record stream transaction, setting up sstream to receive the SStream structure and status to receive an error status return.
ATransID xid; /* transID */
Audio *audio; /* audio connection */
AudioAttrMask a_mask; /* audio attribute mask */
AudioAttributes attribs; /* audio attributes*/
SSRecordParams ss_rp; /* sstream record parameters */
SStream sstream; /* sstream structure */
long status; /* error status */
.
.
.
/* record sstream */
xid = ARecordSStream(audio, a_mask, &attribs, &ss_rp, &sstream, &status);
DEPENDENCIES
This function belongs to the Audio Library of functions that manage connections to an audio server. 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
ARecordSStream() was developed by HP.
SEE ALSO
AConnectRecordSStream(), APlaySStream().
Using the Audio Application Program Interface.
Hewlett-Packard Company — HP-UX Release 9.03: April 1994