Sample Playback And Volume
Posted: Tue Nov 26, 2024 6:02 pm
Lifted this from the docs:
But the default volume almost blew my eardrums, so I wanted to adjust it. But it doesn't work here.
Also, anyone else having problems playing the first defined sample if it's an .iff?
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?