ALgetfloatmax(3dm) ALgetfloatmax(3dm)
ALgetfloatmax, ALsetfloatmax - (obsolete) get/set the maximum value of
floating point sample data.
#include <dmedia/audio.h>
double ALgetfloatmax(ALconfig config)
int ALsetfloatmax(ALconfig config, double maximum_value)
config expects an ALconfig structure, the returned value of a
call to ALnewconfig(3dm) or ALgetconfig(3dm).
maximum_value expects an IEEE double precision floating point value
which defines the range of the floating point data for
the ALreadsamps(3dm) or ALwritesamps(3dm) functions.
ALsetfloatmax and ALgetfloatmax are obsolete and provided for backward
compatibility. The preferred functions are alSetFloatMax(3dm) and
alGetFloatMax(3dm).
ALsetfloatmax(3dm) simultaneously sets the upper and lower bounds of the
data read from a port with the ALreadsamps(3dm) function or written with
the ALwritesamps(3dm) function.
The data transferred into a program with ALreadsamps(3dm) will be scaled
to the range (-maximum_value, maximum_value), where the maximum value of
the input data (32767 in the case of 16-bit analog input) will correspond
to maximum_value. Likewise, the value -32768 will correspond to
-maximum_value in this case.
Data output with ALwritesamps(3dm) should fall in the range (-
maximum_value, maximum_value) to avoid limiting.
ALsetfloatmax(3dm) is only meaningful when the sample format for config
is set to AL_SAMPFMT_FLOAT or AL_SAMPFMT_DOUBLE. See ALsetsampfmt(3dm)
for more details regarding setting the sample data format.
ALsetfloatmax(3dm) can fail for the following reasons:
AL_BAD_CONFIG config is invalid or null.
AL_BAD_FLOATMAX maximum_value is zero.
ALgetfloatmax(3dm) returns the current double precision value of the
bounds in ALconfig structure config.
ALgetfloatmax(3dm) can fail for the following reason:
Page 1
ALgetfloatmax(3dm) ALgetfloatmax(3dm)
AL_BAD_CONFIG config is invalid or null.
Upon successful completion, ALsetfloatmax(3dm) returns 0. Otherwise,
ALsetfloatmax(3dm) returns -1 and sets an error number which can be
retrieved with oserror(3C).
ALgetfloatmax(3dm) returns 0 in the case of failure and sets an error
number which can be retrieved with oserror(3C). When successful,
ALgetfloatmax(3dm) returns a non-zero value.
ALnewconfig(3dm), ALgetconfig(3dm), ALopenport(3dm), ALsetconfig(3dm),
ALsetsampfmt(3dm), oserror(3C)
alGetFloatMax(3dm) alGetFloatMax(3dm)
alGetFloatMax, alSetFloatMax - get/set the maximum value of floating
point sample data.
#include <dmedia/audio.h>
double alGetFloatMax(ALconfig config)
int alSetFloatMax(ALconfig config, double maximum_value)
config expects an ALconfig structure, the returned value of a
call to alNewConfig(3dm) or alGetConfig(3dm).
maximum_value expects an IEEE double precision floating point value
which defines the range of the floating point data for
the alReadFrames(3dm) or alWriteFrames(3dm) functions.
alSetFloatMax simultaneously sets the upper and lower bounds of the data
read from a port with the alReadFrames(3dm) function or written with the
alWriteFrames(3dm) function. This is only meaningful if the sample format
is single- or double-precision floating-point; see alSetSampFmt(3dm) for
more information.
The data transferred into a program with alReadFrames(3dm) will be scaled
to the range (-maximum_value, maximum_value), where the maximum value of
the input data (32767 in the case of 16-bit input) will correspond to
maximum_value. Likewise, the value -32768 will correspond to
-maximum_value in this case.
Data output with alWriteFrames(3dm) or alWriteBuffers(3dm) should fall in
the range (-maximum_value, maximum_value). Normally, the AL will
automatically limit output to this range; however, this can be disabled
with alSetLimiting(3dm) if the application knows its data is always in
range.
alSetFloatMax is only meaningful when the sample format for config is set
to AL_SAMPFMT_FLOAT or AL_SAMPFMT_DOUBLE. See alSetSampFmt(3dm) for more
details regarding setting the sample data format.
alGetFloatMax returns the current value of the floating-point scale in
config.
Upon successful completion, alSetFloatMax returns 0. Otherwise,
alSetFloatMax returns -1 and sets an error number which can be retrieved
with oserror(3C).
alSetFloatMax can fail for the following reasons:
Page 1
alGetFloatMax(3dm) alGetFloatMax(3dm)
AL_BAD_CONFIG config is invalid or null.
AL_BAD_FLOATMAX maximum_value is zero.
alGetFloatMax returns 0 in the case of failure and sets an error number
which can be retrieved with oserror(3C). When successful, alGetFloatMax
returns the (strictly positive) current value of the floating-point scale
in config.
alGetFloatMax can fail for the following reason:
AL_BAD_CONFIG config is invalid or null.
alNewConfig(3dm), alGetConfig(3dm), alOpenPort(3dm), alSetConfig(3dm),
alSetSampFmt(3dm), alSetLimiting(3dm), oserror(3C)
PPPPaaaaggggeeee 2222 [ Back ]
|