sfxrlua
sfxrlua copied to clipboard
Default to a love-supported bit depth for SoundData
Fix "Invalid bit depth: 0" error in love when calling generateSoundData without arguments.
love.sound.newSoundData in Love2d 11 (and earlier?) only supports 8 and 16, so don't default to 0 when generating a love object.
Well, this is not right. Without it, LÖVE won't be able to create SoundData: "Invalid bit depth: 0", but with it the resulting SoundData won't be correct: PCM samples are stored as either 8 or 16 bit signed integers, but are set as floats. So we need this 0 for generateTable.