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 theSndControl
function. In Sound Manager version 3.0 and later, however, you virtually never need to callSndControl
. The capabilities thatSndControl
provides are either provided by theGestalt
function or are no longer supported. TheSndControl
function 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
TheSndControl
function 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 callSndControl
even if no channel has been created for the type of data you want to get information about.SndControl
can be used with theavailableCmd
orversionCmd
sound commands to request information. The requested information is returned in the sound command record specified by thecmd
parameter.
In Sound Manager version 2.0, you can also use the
- IMPORTANT
- The
SndControl
function 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 theGestalt
function to determine whether the sound features you need are available in the current operating environment.totalLoadCmd
andloadCmd
commands 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 theSndControl
function 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
.