Player icon indicating copy to clipboard operation
Player copied to clipboard

Fallback to libsndfile when dr_wav can't handle the file

Open Ghabry opened this issue 7 years ago • 2 comments

Mostly a problem when the PCM is not 16 bit, breaking audio in some games.

~~And imo FastWav could be renamed to BuiltinWav.~~

That's in general an API flaw in the AudioDecoder that the initialized Decoder has no common way to tell if the file is actually supported. Maybe the constructors could be made private and you just let "Open" handle the decision if it will work or not and then fallback to the next one.

Ghabry avatar Mar 22 '18 12:03 Ghabry

not applicable anymore - dr_wav supports everything

Ghabry avatar Sep 06 '21 23:09 Ghabry

On Wii (and other big endian → Amiga) there is no internal conversion function for dr_wav to output s16 for certain files. We can either make use of the SetFormat() call in the dr_wav decoder to use a different output method or implement the fallback mentioned above.

Hitting the assert here: https://github.com/EasyRPG/Player/blob/a003a867c3edea437a21db698662c55c503b89eb/src/dr_wav.h#L1651

carstene1ns avatar Sep 24 '21 20:09 carstene1ns