SPBOpenDevice
SPBOpenDevice Open a sound input device
#include <SoundInput.h> Sound Manager
OSErr SPBOpenDevice( deviceName, permission, inRefNum);
Str255 deviceName; the name of the sound input device
short permission; read/write or read-only.
long * inRefNum; a device reference number
returns Error Code; 0=no error
The SPBOpenDevice function attempts to open a sound input device having
name deviceName. If the call succeeds, it returns a device reference number in
inRefNum.
deviceName input device being opened
permission indicates whether subsequent ope rations with that device are to be
read/write or read-only. If the device is not already in use,
read/write permission is granted; otherwise, only read-only
ope rations are allowed. To make any recording calls or to call
SPBSetDeviceInfo, read/write permission must be available.
inRefNum; a device reference number
Returns: an operating system Error Code.
noErr (0) No error
permErr (-54) Attempt to open locked file for writing
siBadDeviceName (-228) Invalid device name

Notes: You can request that the current default sound input device be opened by
passing either a zero-length string or a NULL string as the deviceName
parameter. If only one sound input device is installed, that device is used.
Generally you should open the default device unless you specifically want to
use some other device. You can get a list of the available devices by calling