alGetChannels(3dm) alGetChannels(3dm) NAME alGetChannels, alSetChannels - get/set the channel setting in an audio ALconfig SYNOPSIS #include <dmedia/audio.h> int alGetChannels(ALconfig config) int alSetChannels(ALconfig config, int channels) PARAMETER 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. DESCRIPTION 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. DIAGNOSTICS 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 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. NOTE alSetConfig(3dm) will not change the channel setting. An application cannot change the channel setting of an ALport after it has been opened. SEE ALSO alNewConfig(3dm), alOpenPort(3dm), alGetConfig(3dm), alWriteFrames(3dm), alReadFrames(3dm), oserror(3C) Page 2