Skip to content

WaveformDataParser: 32bit float audio support #5104

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: develop
Choose a base branch
from

Conversation

NotHyper-474
Copy link
Contributor

@NotHyper-474 NotHyper-474 commented May 16, 2025

Linked Issues

N/A

Description

This is part of my work on FunkinCrew/lime#12 on implementing multiple audio file formats (like MP3, FLAC and some others), which required changing this class to also accommodate for 32bit audio.
Just two things to consider:

  • It expects all audio to be either signed 8 bit, signed 16 bit, or 32 bit float (could've been 32 bit int too but limitations on the current OpenAL-Soft version prevented that). I can probably adjust the Lime PR to also allow for detecting the sign though.
  • The game doesn't seem to be actually able to decode 32 bit audio to actual 32 bit, the OGG decoder seems to only decode to 16 bits at most, and while WAV can there's no handling for that bit per sample on NativeAudioSource. To put it simple, this PR only really makes sense if merged alongside the Lime one.

Screenshots/Videos

(Note: Being able to load MP3 audio is not part of this PR)

heatwaves.mp4

There is also no significant difference between waveforms!

8 bit 16 bit 32 bit Float
8bit 16bit 32bit

@github-actions github-actions bot added status: pending triage Awaiting review. size: medium A medium pull request with 100 or fewer changes. pr: haxe PR modifies game code. and removed status: pending triage Awaiting review. size: medium A medium pull request with 100 or fewer changes. labels May 16, 2025
@NotHyper-474 NotHyper-474 force-pushed the waveformdataparser-enhancements branch from be3564b to 3a05505 Compare May 16, 2025 17:25
@github-actions github-actions bot added the size: medium A medium pull request with 100 or fewer changes. label May 16, 2025
@Hundrec Hundrec added type: enhancement Involves an enhancement or new feature. status: pending triage Awaiting review. labels May 16, 2025
@NotHyper-474 NotHyper-474 force-pushed the waveformdataparser-enhancements branch from bdfc924 to e33c19e Compare May 16, 2025 20:57
@NotHyper-474 NotHyper-474 marked this pull request as ready for review May 16, 2025 20:58
@NotHyper-474 NotHyper-474 force-pushed the waveformdataparser-enhancements branch from aa4129a to 93d7118 Compare May 19, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: haxe PR modifies game code. size: medium A medium pull request with 100 or fewer changes. status: pending triage Awaiting review. type: enhancement Involves an enhancement or new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants