再修正播放采样的超音域问题
This commit is contained in:
@@ -92,11 +92,13 @@ function SFX.playSample(pack,...)--vol-2, sampSet1, vol-3, sampSet2, vol-1
|
|||||||
local top=packSetting[pack].top
|
local top=packSetting[pack].top
|
||||||
local tune=_getTuneHeight(arg[i])--Absolute tune in number
|
local tune=_getTuneHeight(arg[i])--Absolute tune in number
|
||||||
local playTune=tune+rnd(-2,2)
|
local playTune=tune+rnd(-2,2)
|
||||||
if playTune<base then--Too low notes
|
if playTune<=base then--Too low notes
|
||||||
playTune=base
|
playTune=base+1
|
||||||
elseif playTune>top then--Too high notes
|
elseif playTune>top then--Too high notes
|
||||||
playTune=top
|
playTune=top
|
||||||
end
|
end
|
||||||
|
print('play:',playTune)
|
||||||
|
print('delta',tune-playTune)
|
||||||
SFX.play(pack..playTune-base,vol,nil,tune-playTune)
|
SFX.play(pack..playTune-base,vol,nil,tune-playTune)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user