Inside Macintosh: Sound Manager
| Previous | Chapter contents | Chapter top | Section top | Next |
Important: Sound Input Manager 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.
This section describes what you need to do when you do write a sound input device driver. If you write a sound input device driver, you should set the drvrFlags field of the sound input device driver's header to indicate that the driver can handle Status, Control, and Read requests. The driver header should also indicate that the driver needs to be locked.
You don't need to write a device driver to use sound input capabilities.
After you create a device driver, you must write an extension that installs it. Before your extension installs the driver, it should pass the Gestalt function the gestaltSoundAttr attribute selector and inspect the gestaltSoundIOMgrPresent bit to determine if the sound input routines are available. If so, the extension should install the sound input device driver into the unit table just as any other driver must be installed.
After installing the driver, the extension must then make an Open request to the driver, so that the driver can perform any necessary initialization. In particular, the driver might set the dCtlStorage field of the device control entry to a pointer or a handle to a block in the system heap containing all of the variables that it might need. Finally, the device driver signs into the Sound Input Manager by calling the SPBSignInDevice function.
Once signed in, a driver can receive Status, Control, and Read requests from the Sound Input Manager. On entry, the A0 register contains a pointer to a standard Device Manager parameter block, and the A1 register contains a pointer to the device control entry. For more information on using registers in a device driver, see Inside Macintosh: Devices .
Inside Macintosh: Sound Manager
| Previous | Chapter contents | Chapter top | Section top | Next |
Important: Sound Input Manager 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.