Code: Select all
Function p_PlaySound()
local smpdata = {}
slen = 8
For k = 0 To 30
For i = 0 To (slen\2)-1
smpdata[k*slen+i] = -128
smpdata[k*slen+i+(slen\2)] = 127
Next
Next
CreateSample(1, smpdata, 6982)
SetVolume(1, "50%"); NOT WORKING
PlaySample(1)
EndFunctionAlso, anyone else having problems playing the first defined sample if it's an .iff?