Carbon


SPBGetIndexedDevice

Header: Sound.h Carbon status: Supported

Generates a list of sound input devices.

OSErr SPBGetIndexedDevice (
    SInt16 count, 
    Str255 deviceName, 
    Handle *deviceIconHandle
);
Parameter descriptions
count

The index number of the sound input device you wish to obtain information about.

deviceName

On return, a pointer to the name of the sound input device specified by the count parameter.

deviceIconHandle

On return, a pointer to 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.

function result

A result code.

DISCUSSION

The SPBGetIndexedDevice function returns the name and icon of the device whose index is specified in the count 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 returns siBadSoundInDevice.

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 the SPBGetIndexedDevice function allocates memory, you should not call it at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)