ALgetchannels(3dm) ALgetchannels(3dm)
ALgetchannels, ALsetchannels - (obsolete) get/set the channel setting in
an audio ALconfig structure
#include <dmedia/audio.h>
long ALgetchannels(ALconfig config)
int ALsetchannels(ALconfig config, long channels)
config expects an ALconfig structure, the returned value of
ALnewconfig(3dm) or ALgetconfig(3dm).
channels expects a long value indicating the number of samples per
sampling interval. The currently valid values are: 1, 2, and
4.
ALsetchannels and ALgetchannels are obsolete and are provided for
backward compatibility. The preferred functions are alSetChannels(3dm)
and alGetChannels(3dm).
ALgetchannels(3dm) returns the channel setting of the argument config.
ALsetchannels(3dm) sets the channel setting in an ALconfig structure.
The channel setting configures the audio port for mono, stereo, or 4-
channel audio. All ports that you open with this ALconfig structure will
have the channel setting that you specify in channels.
ALgetchannels(3dm) can fail for the following reason:
AL_BAD_CONFIG config is either invalid or null.
ALsetchannels(3dm) can fail for the following reasons:
AL_BAD_CONFIG config is either invalid or null.
AL_BAD_CHANNELS channels is not one of 1, 2, or 4.
Upon successful completion, ALgetchannels(3dm) returns a number greater
than 0. Otherwise, ALgetchannels(3dm) returns -1 and sets an error number
which can be retrieved using oserror(3C).
ALsetchannels(3dm) returns 0 when successfully called. Otherwise,
ALsetchannels(3dm) returns -1 and sets an error number which can be
retrieved using oserror(3C).
Page 1
ALgetchannels(3dm) ALgetchannels(3dm)
NOTE
ALsetconfig(3dm) will not change the channel setting. You can't change
the channel setting of an ALport after it has been opened.
ALnewconfig(3dm), ALopenport(3dm), ALgetconfig(3dm), ALwritesamps(3dm),
ALreadsamps(3dm), oserror(3C)
alGetChannels(3dm) alGetChannels(3dm)
alGetChannels, alSetChannels - get/set the channel setting in an audio
ALconfig
#include <dmedia/audio.h>
int alGetChannels(ALconfig config)
int alSetChannels(ALconfig config, int channels)
config expects an ALconfig structure, the returned value of
alNewConfig(3dm) or alGetConfig(3dm).
channels expects a int value indicating the number of samples per
sample frame, i.e. the number of channels.
alGetChannels returns the of number of samples per frame in the given
config.
alSetChannels sets the channel setting in an ALconfig structure. All
ports that you attempt to open with this ALconfig structure will try to
use the channel setting that you specify in channels.
Upon successful completion, alGetChannels returns a number greater than
0. Otherwise, alGetChannels returns -1 and sets an error number which can
be retrieved using oserror(3C).
alSetChannels returns 0 when successfully called. Otherwise,
alSetChannels returns -1 and sets an error number which can be retrieved
using oserror(3C).
Either function can fail for the following reason:
AL_BAD_CONFIG config is either invalid or null.
In addition, alSetChannels can fail for the following reasons:
AL_BAD_CHANNELS [Toc] [Back]
channels is invalid. Note that alSetChannels may succeed even if a
bad value for channels is given; however, in this case, the ensuing
alOpenPort call will fail and set an error of AL_BAD_CHANNELS.
alSetConfig(3dm) will not change the channel setting. An application
cannot change the channel setting of an ALport after it has been opened.
Page 1
alGetChannels(3dm) alGetChannels(3dm)
SEE ALSO
alNewConfig(3dm), alOpenPort(3dm), alGetConfig(3dm), alWriteFrames(3dm),
alReadFrames(3dm), oserror(3C)
PPPPaaaaggggeeee 2222 [ Back ]
|