sfxrlua icon indicating copy to clipboard operation
sfxrlua copied to clipboard

Default to a love-supported bit depth for SoundData

Open idbrii opened this issue 4 years ago • 1 comments

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.

idbrii avatar Jan 09 '22 01:01 idbrii

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.

tpimh avatar Nov 10 '24 16:11 tpimh