Skip to content
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

Replace built-in "Fast WAV" decoder with dr_wav #2571

merged 1 commit into from
Jul 12, 2021


Copy link

@Ghabry Ghabry commented Jul 11, 2021

Also enabled it for all platforms. Should make WAV-loading everywhere faster because libsndfile scans the entire file once...

This also removes FastWAV by @Rinnegatamante . That decoder served us well but dr_wav is superior. :)

dr_wav states that it supports and has tests for:

  • Unsigned 8-bit PCM
  • Signed 12-bit PCM
  • Signed 16-bit PCM
  • Signed 24-bit PCM
  • Signed 32-bit PCM
  • IEEE 32-bit floating point
  • IEEE 64-bit floating point
  • A-law and u-law
  • Microsoft ADPCM
  • IMA ADPCM (DVI, format code 0x11)

This should be kinda everything we need?

@Ghabry Ghabry added Audio Performance Related to improvements on memory, less CPU or disk usage, battery savings, etc. labels Jul 11, 2021
@Ghabry Ghabry added this to the 0.7.0 milestone Jul 11, 2021
@Ghabry Ghabry force-pushed the dr_wav branch 4 times, most recently from 4fd1134 to 14b818e Compare July 11, 2021 21:03
Copy link
Member Author

Ghabry commented Jul 11, 2021

I must summon a autotools expert here @carstene1ns

WANT_DRWAV is not forwarded to for unknown reasons.

DrWav shall be enabled by default

I do:

	AS_HELP_STRING([--enable-drwav],[use internal WAV library dr_wav @<:@default=yes@:>@]), [], [enable_drwav="yes"])
^-- set to "yes" if not provided
AS_IF([test "x$enable_drwav" = "xyes"], 
	AC_DEFINE([WANT_DRWAV],[1],[use internal WAV library dr_wav])]) <-- THIS WORKS PERFECT
AM_CONDITIONAL([WANT_DRWAV],[test "x$enable_drwav" = "xyes"])
^-- THIS DOES NOT WORK (no WANT_DRWAV in Get a linker error

Any idea why?

Copy link

fdelapena commented Jul 12, 2021

Any idea why?

Missing AC_SUBST maybe? (Autoconf docs, Automake docs) For those with PKG_CHECK_MODULES is not required since a while because it does it implicitly. There are some examples in the Player itself. Or a weird example from a toy project.

Copy link

configure complained ./configure: line 5845: ]: command not found
And indeed there was a stray quotation mark, serving as shell brace.

src/decoder_drwav.cpp Outdated Show resolved Hide resolved
Thanks to carsteneins for the autotools help.
@fdelapena fdelapena merged commit 6b30d38 into EasyRPG:master Jul 12, 2021
@Ghabry Ghabry deleted the dr_wav branch February 22, 2022 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Audio Performance Related to improvements on memory, less CPU or disk usage, battery savings, etc.

Successfully merging this pull request may close these issues.

None yet

3 participants