ALgetsampfmt(3dm) ALgetsampfmt(3dm)
ALgetsampfmt, ALsetsampfmt - (obsolete) get/set the sample format setting
in an audio ALconfig structure
#include <dmedia/audio.h>
long ALgetsampfmt(ALconfig config)
int ALsetsampfmt(ALconfig config, long sampleformat)
config expects an ALconfig structure, the returned value of a
call to ALnewconfig(3dm) or ALgetconfig(3dm).
sampleformat expects a symbolic constant that identifies the format of
an audio sample. There are three symbolic constants
defined for this parameter.
ALsetsampfmt and ALgetsampfmt are obsolete and are provided for backward
compatibility. The preferred functions are alSetSampFmt(3dm) and
alGetSampFmt(3dm).
ALsetsampfmt(3dm) sets the sample format in the ALconfig structure
config. Any audio port that you then configure using config will have
the audio sample format you specify with sampleformat.
ALgetsampfmt(3dm) returns the current sample format setting in the
ALconfig structure config.
The currently defined set of sample formats found in audio.h are:
AL_SAMPFMT_TWOSCOMP
indicates linear PCM two's complement integer sample
format. Width of the integer data is one of signed char,
short, or long as specified by the ALsetwidth(3dm)
function.
AL_SAMPFMT_FLOAT
indicates linear PCM IEEE 32-bit floating point
sample format.
AL_SAMPFMT_DOUBLE
indicates linear PCM IEEE 64-bit floating
point sample format.
ALsetsampfmt(3dm) can fail for the following reasons:
AL_BAD_CONFIG config is invalid or null.
AL_BAD_SAMPFMT sampleformat is not one of the accepted constants.
Page 1
ALgetsampfmt(3dm) ALgetsampfmt(3dm)
ALgetsampfmt(3dm) can fail for the following reason:
AL_BAD_CONFIG config is invalid or null.
Upon successful completion, ALgetsampfmt(3dm) returns a long whose value
is the same as one of the symbolic constants described above for
sampleformat. Otherwise, ALgetsampfmt(3dm) returns -1 and sets an error
number which can be retrieved with oserror(3C).
Upon successful completion, ALsetsampfmt(3dm) returns 0. Otherwise, -1 is
returned and an error number is set as described above.
ALnewconfig(3dm), ALgetconfig(3dm), ALopenport(3dm), ALsetconfig(3dm),
ALsetfloatmax(3dm), ALgetfloatmax(3dm), oserror(3C)
alGetSampFmt(3dm) alGetSampFmt(3dm)
alGetSampFmt, alSetSampFmt - get/set the sample format setting in an
audio ALconfig structure
#include <dmedia/audio.h>
int alGetSampFmt(ALconfig config)
int alSetSampFmt(ALconfig config, int sampleformat)
config expects an ALconfig structure, the returned value of a
call to alNewConfig(3dm) or alGetConfig(3dm).
sampleformat expects a symbolic constant that identifies the format of
an audio sample. There are three symbolic constants
defined for this parameter.
alSetSampFmt(3dm) sets the sample format in the ALconfig structure
config. Any audio port that you then configure using config will have
the audio sample format you specify with sampleformat.
alGetSampFmt(3dm) returns the current sample format setting in the
ALconfig structure config.
The currently defined set of sample formats found in audio.h are:
AL_SAMPFMT_TWOSCOMP
indicates linear PCM two's complement integer sample
format. Width of the integer data is one of signed char,
short, or int, as specified by the alSetWidth(3dm)
function.
AL_SAMPFMT_FLOAT
indicates linear PCM IEEE 32-bit floating point
sample format. With this format, the value given
by alSetWidth(3dm) is ignored.
AL_SAMPFMT_DOUBLE
indicates linear PCM IEEE 64-bit floating
point sample format. With this format, the value given
by alSetWidth(3dm) is ignored.
AL_AES_CHANNEL_STATUS
indicates each 24-byte wide "sample" is a single channel
of Channel Status subcode information as defined by the
IEC-958 and AES3-1992 Digital Audio Interface specifications.
With this format, the value given by alSetWidth(3dm)
is ignored.
AL_AES_USER
indicates each 24-byte wide "sample" is a single channel
of User subcode data as defined by the IEC-958 and
AES3-1992 Digital Audio Interface specifications. With
Page 1
alGetSampFmt(3dm) alGetSampFmt(3dm)
this format, the value given by alSetWidth(3dm)
is ignored.
AL_AES_VALIDITY
indicates each 24-byte wide "sample" is a single channel
of Validity data information as defined by the IEC-958
and AES3-1992 Digital Audio Interface specifications.
With this format, the value given by alSetWidth(3dm)
is ignored.
Upon successful completion, alGetSampFmt(3dm) returns a int whose value
is the same as one of the symbolic constants described above for
sampleformat. Otherwise, alGetSampFmt(3dm) returns -1 and sets an error
number which can be retrieved with oserror(3C).
alGetSampFmt(3dm) can fail for the following reason:
AL_BAD_CONFIG config is invalid or null.
Upon successful completion, alSetSampFmt(3dm) returns 0. Otherwise, -1 is
returned and an error number is set as described above.
alSetSampFmt(3dm) can fail for the following reasons:
AL_BAD_CONFIG config is invalid or null.
AL_BAD_SAMPFMT sampleformat is not one of the accepted constants.
Only Octane, Onyx2, Origin and systems with the Professional PCI Digital
Audio option card support subcode data streams. Although it is valid to
set an ALconfig's sample format to a subcode format on systems other than
these, it is alOpenPort(3dm) that ultimately determines the ALconfig's
validity with respect to the device specified by alSetDevice(3dm).
Subcode data bit ordering always puts subcode Byte 0, bit 0 in the most
significant bit of Byte 0, thus allowing a big-endian bit shift operation
to correspond to subcode data time shift.
alNewConfig(3dm), alGetConfig(3dm), alOpenPort(3dm), alSetConfig(3dm),
alSetFloatMax(3dm), alGetFloatMax(3dm), alSetDevice(3dm), oserror(3C)
PPPPaaaaggggeeee 2222 [ Back ]
|