alGetConfig(3dm) alGetConfig(3dm)
NAME
alGetConfig, alSetConfig - get/set the ALconfig of an audio ALport
SYNOPSIS
#include <dmedia/audio.h>
ALconfig alGetConfig(ALport port)
int alSetConfig(ALport port, ALconfig config)
PARAMETER
port expects an ALport, the returned value of an alOpenPort(3dm)
call.
config expects an ALconfig, the returned value of a call to
alNewConfig(3dm) or alGetConfig.
DESCRIPTION
alGetConfig leaves port unchanged, but returns an ALconfig structure
initialized to the configuration values of the audio port. alFreeConfig
should be called when the returned ALconfig is no longer needed.
alSetConfig attempts to change the configuration of the audio port, port,
to match that described by the ALconfig structure, config.
ALconfig structures contain information which specifies configuration
options for a port such as queue size, sample width, and number of
channels.
DIAGNOSTICS
When alGetConfig fails, it returns a null-valued ALconfig.
alGetConfig can fail for the following reasons:
ALBADPORT port is either invalid or null.
ALBADOUTOFMEM insufficient memory is available to allocate the
ALconfig structure.
Upon successful completion, alSetConfig returns 0. Otherwise, alSetConfig
returns -1 and sets an error number which can be retrieved using
oserror(3C).
alSetConfig can fail for the following reasons:
ALBADPORT port is either invalid or null.
ALBADCONFIG config is either invalid or null.
ALBADDEVICE port and config have conflicting device settings.
Page 1
alGetConfig(3dm) alGetConfig(3dm)
ALBADQSIZE port and config have conflicting values for queue size.
ALBADCHANNELS port and config have conflicting number of channels.
NOTE
The device, queue size, and the number of channels of a port are static
attributes; they cannot be changed once a port is opened.
If you attempt to change any of these values, alSetConfig will fail.
SEE ALSO
alFreeConfig(3dm), alNewConfig(3dm), alSetQueueSize(3dm),
alSetWidth(3dm), alSetChannels(3dm), alSetDevice(3dm), oserror(3C)
Page 2