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.
SndControl
You can obtain information about a sound data type by using theSndControlfunction. In Sound Manager version 3.0 and later, however, you virtually never need to callSndControl. The capabilities thatSndControlprovides are either provided by theGestaltfunction or are no longer supported. TheSndControlfunction is documented here for completeness only.
FUNCTION SndControl (id: Integer; VAR cmd: SndCommand): OSErr;
id- The sound data type you want to get information about.
cmd- A sound command.
DESCRIPTION
TheSndControlfunction sends a control command directly to the Sound Manager to get information about a specific data type. The available data types are specified by constants:
CONST squareWaveSynth = 1; {square-wave data} waveTableSynth = 3; {wave-table data} sampledSynth = 5; {sampled-sound data}You can callSndControleven if no channel has been created for the type of data you want to get information about.SndControlcan be used with theavailableCmdorversionCmdsound commands to request information. The requested information is returned in the sound command record specified by thecmdparameter.
In Sound Manager version 2.0, you can also use the
- IMPORTANT
- The
SndControlfunction can indicate only whether a particular data format supports some feature (for example, stereo output), not whether the available sound hardware also supports that feature. In general, you should use theGestaltfunction to determine whether the sound features you need are available in the current operating environment.![]()
totalLoadCmdandloadCmdcommands to get information about the amount of CPU time consumed by sound-related processing. However, these commands are not very accurate and are not supported by version 3.0 and later.SPECIAL CONSIDERATIONS
You should not call theSndControlfunction at interrupt time.RESULT CODES
noErr 0 No error SEE ALSO
See the list of sound commands in "Sound Command Numbers" beginning on page 2-92 for a complete description of the sound commands supported bySndControl.