Skip to content

Default to a love-supported bit depth for SoundData #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

idbrii
Copy link

@idbrii idbrii commented Jan 9, 2022

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.

Fix "Invalid bit depth: 0" error in love when calling generateSoundData
without arguments.

Love2d 11 (and earlier?) only supports 8 and 16, so don't default to 0
when generating a love object.
@tpimh
Copy link

tpimh commented Nov 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants