Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 3 - Sound Input Manager / Sound Input Manager Reference
Sound Input Manager Routines / Opening and Closing 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.

SPBCloseDevice

You can use the SPBCloseDevice function to close a sound input device.

FUNCTION SPBCloseDevice (inRefNum: LongInt): OSErr;
inRefNum
The device reference number of the sound input device to close.
DESCRIPTION
The SPBCloseDevice function closes a device that was previously opened by SPBOpenDevice and whose device reference number is specified in the inRefNum parameter.

SPECIAL CONSIDERATIONS
Because the SPBCloseDevice function moves or purges memory, you should not call it at interrupt time.

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

RESULT CODES
noErr0No error
siBadRefNum-229Invalid reference number

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996