ASetupConversion(3X)
NAME
ASetupConversion − perform setup required for stream data conversion
SYNOPSIS
#include <Alib.h> AConvertParams ∗
ASetupConversion (
Audio ∗ audio,
AudioAttributes ∗ src_attributes,
AByteOrder ∗ src_byte_order,
AudioAttributes ∗ dest_attributes,
AByteOrder ∗ dest_byte_order,
long ∗ status_return );
DESCRIPTION
ASetupConversion() performs initialization for stream data conversion. The user specifies the source stream attributes and byte order and the desired destination stream attributes. ASetupConversion() returns a pointer to an AConvertParams structure, which will be used by AConvertBuffer() to perform the stream conversion.
audio specifies the Audio structure associated with this connection.
src_attributes specifies the attributes of the source stream.
src_byte_order specifies the byte ordering of the source stream. One of the following values:
ALSBFirst − Least significant byte first.
AMSBFirst − Most significant byte first.
dest_attributes specifies the attributes of the destination stream.
dest_byte_order specifies the byte ordering of the destination stream. Either ALSBFirst or AMSBFirst.
status_return receives the returned status of the operation, unless this parameter is passed in as a NULL pointer. If status_return is set to NULL, Alib will do the error handling.
RETURN VALUE
Upon successful completion, ASetupConversion() returns a pointer to the conversion parameter structure AConvertParams. To free the space allocated for this structure, use AEndConversion().
ERRORS
If status_return is not set to NULL, it can return one of the following values:
0 AENoError No error - the call completed successfully.
17 AEOutOfMemory The Audio Library could not allocate space for the data.
NOTE
In order to ensure that the compiler finds the Audio Library (libAlib.sl) and the Alib.h header file, you must add the following switches:
-L /opt/audio/lib
-I/opt/audio/include
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 Using the Audio Developer’s Kit or the online help for the Audio control panel. For information about the audio capabilities of a particular system use the online example audioinfo.c.
AUTHOR
ASetupConversion() was developed by HP.
SEE ALSO
AConvertBuffer(3X), AChooseSourceAttributes(3X), AChoosePlayAttributes(3X),
AEndConversion(3X).
Hewlett-Packard Company — Audio Library: February, 1995