Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 3 - Sound Input Manager / Sound Input Manager Reference
Sound Input Manager Routines / Registering Sound Input Devices


Legacy Documentclose button

Important: Inside Macintosh: Sound is deprecated as of Mac OS X v10.5. For new audio development in Mac OS X, use Core Audio. See the Audio page in the ADC Reference Library.

SPBSignInDevice

You can register a sound input device by calling the SPBSignInDevice function.

FUNCTION SPBSignInDevice (deviceRefNum: Integer; 
                           deviceName: Str255): OSErr;
deviceRefNum
The device driver reference number of the sound input device to register with the Sound Input Manager.
deviceName
The device's name as it is to appear to the user in the Sound In control panel (which is not the name of the driver used by the Device Manager).
DESCRIPTION
The SPBSignInDevice function registers with the Sound Input Manager the device whose driver reference number is deviceRefNum.

The deviceName parameter specifies this device's name as it is to appear to the user in the Sound In control panel (which is not the name of the driver itself). Accordingly, the name should be as descriptive as possible. You should call SPBSignInDevice after you have already opened your driver by calling normal Device Manager routines.

SPECIAL CONSIDERATIONS
Because the SPBSignInDevice function moves or purges memory, you should not call it at interrupt time. You can, however, call it at system startup time.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the SPBSignInDevice function are
Trap macroSelector
_SoundDispatch$030C0014

RESULT CODES
noErr0No error
siBadSoundInDevice-221Invalid sound input device

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996