int SetSoundNoise(nSource,nDuration)
This function sets the source and duration of a noise in the noise hardware of the play device.
Parameter | Type/Description |
nSource | int Specifies the noise source. It can be any one of the following values, where N is a value used to derive a target frequency: | ||
Value | Meaning | ||
S_PERIOD512 | Source frequency is N/512 (high pitch); hiss is less coarse. | ||
S_PERIOD1024 | Source frequency is N/1024. | ||
S_PERIOD2048 | Source frequency is N/2048 (low pitch); hiss is coarser. | ||
S_PERIODVOICE | Source frequency from voice channel 3. | ||
S_WHITE512 | Source frequency is N/512 (high pitch); hiss is less coarse. | ||
S_WHITE1024 | Source frequency is N/1024. | ||
S_WHITE2048 | Source frequency is N/2048 (low pitch); hiss is coarser. | ||
S_WHITEVOICE | Source frequency from voice channel 3. | ||
nDuration | int Specifies the duration of the noise (in clock ticks). |
The return value specifies the result of the function. It is zero if the function is successful. If the source is invalid, the return value is S_SERDSR.