StopInstrument()
when an instrument is still sounding, or if you set an amplitude or gain knob abruptly to 0.To avoid pops, you need to smoothly change the amplitude from full amplitude to 0 over at least 10 msec to eliminate the pop. This can be done in two ways:
TweakKnob()
rapidly in a loop. This ties up the main CPU but does not require any special DSP resources.
envelope.dsp
.
See Instrument Templates, in the 3DO Music and Audio Programmer's Reference for descriptions of the instrument templates.
See the example file ta_nopop.c. This example program can be obtained from the 3DO InfoServer.