From 51635d7aafe432d3b707585ff30f17480aa035a0 Mon Sep 17 00:00:00 2001 From: nucular Date: Sun, 18 Sep 2016 23:51:46 +0200 Subject: [PATCH] Fix default endianness in Sound:generateString --- sfxr.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/sfxr.lua b/sfxr.lua index 8074a02..d44b06e 100644 --- a/sfxr.lua +++ b/sfxr.lua @@ -808,6 +808,7 @@ end function sfxr.Sound:generateString(rate, depth, endianness) rate = rate or 44100 depth = depth or 16 + endianness = endianness or 0 assert(sfxr.SAMPLERATE[rate], "invalid sampling rate: " .. tostring(rate)) assert(sfxr.BITDEPTH[depth] and depth ~= 0, "invalid bit depth: " .. tostring(depth)) assert(sfxr.ENDIANNESS[endianness], "invalid endianness: " .. tostring(endianness))