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.
SndAddModifier
The Sound Manager previously used theSndAddModifier
function to link modifiers to sound channels.
FUNCTION SndAddModifier (chan: SndChannelPtr; modifier: ProcPtr; id: Integer; init: LongInt): OSErr;
chan
- A pointer to a valid sound channel.
modifier
- A pointer to a modifier function to be added to the sound channel specified by
chan
. This field is obsolete.id
- The resource ID of the modifier to be linked to the sound channel.
init
- The initialization parameters for the sound channel specified by
chan
.DESCRIPTION
TheSndAddModifier
function installs a modifier into an open channel specified in thechan
parameter. Themodifier
parameter should beNIL
, and theid
parameter is the resource ID of the modifier to be linked to the sound channel.SndAddModifier
causes the Sound Manager to load the specified'snth'
resource, lock it in memory, and link it to the channel specified.
The only supported use of the
- IMPORTANT
- The
SndAddModifier
function is for internal Sound Manager use only. You should not call it in your application.SndAddModifier
function is to change the data type associated with a sound channel. For example, you can pass the constantsampledSynth
in theid
parameter to reconfigure a sound channel for sampled-sound data. You should, however, set a sound channel's data type when you callSndNewChannel
, not by callingSndAddModifier
.SPECIAL CONSIDERATIONS
You should not use theSndAddModifier
function.RESULT CODES
noErr 0 No error resProblem -204 Problem loading the resource badChannel -205 Channel is corrupt or unusable SEE ALSO
To modify sampled-sound data immediately before the Sound Manager plays it, you can customize double buffering routines so that your application can modify sampled-sound data when it fills a buffer of sound data for the Sound Manager to play. For more information, see "Using Double Buffers" on page 2-68.To change the initialization options for a sound channel, you can use the
reInitCmd
command. For a description of that command, see "Sound Command Numbers" beginning on page 2-92.