播放立体声音效限制输入值范围
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
local type,rem=type,table.remove
|
||||
local int,rnd=math.floor,math.random
|
||||
local interval=MATH.interval
|
||||
|
||||
local sfxList={}
|
||||
local packSetting={}
|
||||
@@ -140,7 +141,7 @@ local function _play(name,vol,pos,pitch)
|
||||
S=S[n]--AU_SRC
|
||||
if S:getChannelCount()==1 then
|
||||
if pos then
|
||||
pos=pos*stereo
|
||||
pos=interval(pos,-1,1)*stereo
|
||||
S:setPosition(pos,1-pos^2,0)
|
||||
else
|
||||
S:setPosition(0,0,0)
|
||||
|
||||
Reference in New Issue
Block a user