alGetDevice(3dm) alGetDevice(3dm) NAME alSetDevice, alGetDevice - get/set the device setting in an audio ALconfig structure SYNOPSIS #include <dmedia/audio.h> int alGetDevice(ALconfig config) int alSetDevice(ALconfig config, int device) PARAMETER config expects an ALconfig structure, the returned value of a call to alNewConfig(3dm) or alGetConfig(3dm). device expects the integer resource ID of an audio device (see alResources(3dm)). DESCRIPTION alSetDevice sets the device setting in the ALconfig structure config. Any audio port that you then open using config will attempt to use the device you specify. alGetDevice returns the current device setting in the ALconfig structure config. Note that since device connections are dynamic, ports previously opened with this ALconfig may no longer be connected to the given device. DIAGNOSTICS If successful, alGetDevice returns a positive device resource ID. Otherwise, alGetDevice returns -1 and and sets an error number which can be retrieved with oserror(3C). alGetDevice can fail for the following reason: AL_BAD_CONFIG config is invalid or null. If successful, alSetDevice returns 0. Otherwise, it returns -1 and sets an error number which can be retrieved with oserror(3C). alSetDevice can fail for the following reasons: AL_BAD_CONFIG config is invalid or null. AL_BAD_DEVICE device is invalid. Note that even though alSetDevice may succeed in setting a given device in an ALconfig, the ensuing alOpenPort may still fail if the device does not exist. SEE ALSO alNewConfig(3dm), alGetConfig(3dm), alOpenPort(3dm), alSetConfig(3dm), oserror(3C) Page 1