ACreateSBucket(3X) — Series 700 Only
NAME
ACreateSBucket − create empty sound bucket and return pointer to it
SYNOPSIS
#include <audio/Alib.h>
SBucket *
ACreateSBucket (
Audio *audio,
AudioAttrMask attr_mask,
AudioAttributes *audio_attributes,
long *status_return
);
DESCRIPTION
ACreateSBucket() creates an empty sound bucket to receive recorded data, associates it with audio attributes, and returns the pointer to it.
audio specifies the Audio structure associated with this connection.
attr_mask is the mask used to select attributes
audio_attributes is the structure containing the audio type and attributes. Audio type must be set.
status_return receives the returned status of the operation, unless it is set to NULL.
RETURN VALUE
Upon successful completion, ACreateSBucket() returns a pointer to a sound bucket.
ERRORS
If status_return is not set to NULL, one of the following is returned in status_return:
0 AENoError
2 AEBadAudio
7 AEBadDataFormat
13 AEBadAttribute
17 AEOutOfMemory
19 AEBadSamplingRate
EXAMPLES
The following example creates sound bucket sb and selects Bit Per Sample and Duration attributes:
SBucket *sb; /* sound bucket */
Audio *audio; /* audio connection */
AudioAttrMask amask; /* audio attributes mask */
AudioAttributes *attr; /* audio attributes */
long status; /* error status */
.
.
.
/* create sound bucket */
amask = (ASAFBitPerSample | ASAFDuration);
sb = ACreateSBucket(audio, amask, attr, &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
ACreateSBucket() was developed by HP.
SEE ALSO
ADestroySBucket(3X), AGetSBucketData(3X), ALoadAFile(3X), APlaySBucket(3X), APutSBucketData(3X), ARecordAData(3X), ASaveSBucket(3X).
Using the Audio Application Program Interface.
Hewlett-Packard Company — HP-UX Release 9.10: April 1995