mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-24 18:44:20 +00:00
Fix default endianness in Sound:generateString
This commit is contained in:
parent
b5940ce0c6
commit
51635d7aaf
1
sfxr.lua
1
sfxr.lua
@ -808,6 +808,7 @@ end
|
|||||||
function sfxr.Sound:generateString(rate, depth, endianness)
|
function sfxr.Sound:generateString(rate, depth, endianness)
|
||||||
rate = rate or 44100
|
rate = rate or 44100
|
||||||
depth = depth or 16
|
depth = depth or 16
|
||||||
|
endianness = endianness or 0
|
||||||
assert(sfxr.SAMPLERATE[rate], "invalid sampling rate: " .. tostring(rate))
|
assert(sfxr.SAMPLERATE[rate], "invalid sampling rate: " .. tostring(rate))
|
||||||
assert(sfxr.BITDEPTH[depth] and depth ~= 0, "invalid bit depth: " .. tostring(depth))
|
assert(sfxr.BITDEPTH[depth] and depth ~= 0, "invalid bit depth: " .. tostring(depth))
|
||||||
assert(sfxr.ENDIANNESS[endianness], "invalid endianness: " .. tostring(endianness))
|
assert(sfxr.ENDIANNESS[endianness], "invalid endianness: " .. tostring(endianness))
|
||||||
|
Loading…
Reference in New Issue
Block a user