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.
SPBGetIndexedDevice
You can use theSPBGetIndexedDevice
function to help generate a list of sound input devices.
FUNCTION SPBGetIndexedDevice (count: Integer; VAR deviceName: Str255; VAR deviceIconHandle: Handle): OSErr;
count
- The index number of the sound input device you wish to obtain information about.
deviceName
- On exit, the name of the sound input device specified by the
count
parameter.deviceIconHandle
- On exit, a handle to the icon of the sound input device specified by the
count
parameter. The memory for this icon is allocated automatically, but your application must dispose of it.DESCRIPTION
TheSPBGetIndexedDevice
function returns the name and icon of the device whose index is specified in thecount
parameter. Your application can create a list of sound input devices by calling this function with a count starting at 1 and incrementing it by 1 until the function returnssiBadSoundInDevice
.Because the Sound In control panel allows the user to select a sound input device, most applications should not use this function. Your application might need to use this function if it allows the user to record from more than one sound input device at once.
SPECIAL CONSIDERATIONS
Because theSPBGetIndexedDevice
function allocates memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSPBGetIndexedDevice
function are
Trap macro Selector _SoundDispatch $05140014 RESULT CODES
noErr 0 No error siBadSoundInDevice -221 Invalid sound input device