I am making an app where the user drags an object and it needs to make a constant dragging noise so I put this in to do that.
-----CODE
local sounds = {}
sounds[“dragNoise”] = audio.loadSound(“dragNoise.wav”)
audio.setVolume(1, {channel = 1})
function playSound(name)
if name == “dragNoise” then
audio.stop(1)
audio.play(sounds[“dragNoise”], {channel=1})
end
end
-----CODE
then I have my dragging function and I put this in
-----CODE
elseif(event.phase==“moved”) then
playSound(“dragNoise”)
-----CODE
this works fine and it plays the sound except it is playing it over and over again at the beginning and it sounds awful I want the noise to sound constant. PLEASE HELP!