PlaySfx (RSDKv5)¶
Description¶
Plays the sound effect in the given slot, looping it if a loop point is set.
Parameters¶
sfx
-
The slot of the sound effect.
loopPoint
-
The sound effect's loop point, in samples.
0
will disable looping,1
will loop from the beginning of the sound effect, and anything else is the sample to loop from. priority
-
The priority of the sound effect.
Return Value¶
Returns the ID of the channel the sound effect plays in as an int32
. The return value will be -1
if the sound effect failed to play.