mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-24 18:44:20 +00:00
default to 16 bit SoundData, but samples must always be set as floats
This commit is contained in:
parent
5be02b5585
commit
c01399d1f3
4
sfxr.lua
4
sfxr.lua
@ -858,11 +858,11 @@ end
|
||||
-- @raise "invalid sampling rate: x", "invalid bit depth: x"
|
||||
function sfxr.Sound:generateSoundData(rate, depth, sounddata)
|
||||
rate = rate or 44100
|
||||
depth = depth or 0
|
||||
depth = depth or 16
|
||||
assert(sfxr.SAMPLERATE[rate], "invalid sampling rate: " .. tostring(rate))
|
||||
assert(sfxr.BITDEPTH[depth] and depth, "invalid bit depth: " .. tostring(depth))
|
||||
|
||||
local tab, count = self:generateTable(rate, depth)
|
||||
local tab, count = self:generateTable(rate)
|
||||
|
||||
if count == 0 then
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user