APlaySStream(3X) — Series 700 Only
NAME
APlaySStream − initiate transaction and return transaction ID and SStream structure
SYNOPSIS
#include <audio/Alib.h>
ATransID APlaySStream(
Audio *audio,
AudioAttrMask attr_mask,
AudioAttributes *audio_attributes,
SSPlayParams *pp,
SStream *sstream_return,
long *status_return
);
DESCRIPTION
APlaySStream() initiates a play sound stream transaction and returns a transaction ID and an SStreams structure that contains a TCP socket address.
The application connects the socket it has created to the TCP address. The play operation begins as soon as there is data on the sound stream. The play 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.
pp is the pointer to the play parameters associated with the play operation.
status_return receives the returned status of the operation unless it is set to NULL.
RETURN VALUE
Upon successful completion, APlaySStream() 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 play stream transaction and sets 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*/
SSPlayParams ss_pp; /* sstream play parameters */
SStream sstream; /* sstream structure */
long status; /* error status */
.
.
.
/* play sstream */
xid = APlaySStream(audio, a_mask, attribs, ss_pp, &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
APlaySStream() was developed by HP.
SEE ALSO
AConnectRecordSStream(), ARecordSStream().
Using the Audio Application Program Interface.
Hewlett-Packard Company — HP-UX Release 9.0: August 1992