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 theSPBCloseDevicefunction to close a sound input device.
FUNCTION SPBCloseDevice (inRefNum: LongInt): OSErr;
inRefNum- The device reference number of the sound input device to close.
DESCRIPTION
TheSPBCloseDevicefunction closes a device that was previously opened bySPBOpenDeviceand whose device reference number is specified in theinRefNumparameter.SPECIAL CONSIDERATIONS
Because theSPBCloseDevicefunction moves or purges memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSPBCloseDevicefunction are
Trap macro Selector _SoundDispatch $021C0014 RESULT CODES
noErr 0 No error siBadRefNum -229 Invalid reference number