Sound.fadeIn

Plays this sound in the selected channel with a fade in effect.

class Sound
int
fadeIn
(
int ms
,
int loops = 1
,
int channel = -1
,
int maxTicks = -1
)

Parameters

ms int

Milliseconds for the fade-in effect to complete.

loops int

-1 loops will play forever. 0 plays once.

channel int

-1 loops will choose the first free unreserved channel.

maxTicks int

Maximum milliseconds to play this sound. If not enough loops or the sample chunk is not long enough, then the sample may stop before this timeout occurs. -1 means play forever.

Return Value

Type: int

the channel the sample is played on. On any errors, -1 is returned.

Meta