| Summary: | [PATCH] Extended WAV support | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Vitaly Novichkov <admin> |
| Component: | misc | Assignee: | Ozkan Sezer <sezeroz> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | admin, sezeroz |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
Extended support for WAV and AIFF
Example uLAW-encoded WAV file with 8000 hz A set of wave sampls of different sample formats Extended support for WAV and AIFF |
||
|
Description
Vitaly Novichkov
2019-11-27 12:54:58 UTC
Created attachment 4073 [details]
Extended support for WAV and AIFF
Created attachment 4074 [details]
Example uLAW-encoded WAV file with 8000 hz
Didn't review/test the patch, however one should be aware that the borrowed g711.c code has a different license than zlib: https://github.com/escrichov/G711/blob/master/g711.c IANAL, so a matter for the ones who know about such things. Created attachment 4075 [details]
A set of wave sampls of different sample formats
A set of test wave files of different formats. Many of them won't play on SDL2_mixer, however, they are playable with this patch.
ALSO! I totally forget that some of my wave samples have stuck the SDL2_mixer previously (mainly on an attempt to open one of unsupported sample formats). My patch fixes also this bug. (In reply to Vitaly Novichkov from comment #5) > ALSO! I totally forget that some of my wave samples have stuck the > SDL2_mixer previously (mainly on an attempt to open one of unsupported > sample formats). My patch fixes also this bug. Can you point to the exact part(s) of the patch which fixes that issue? (In reply to Ozkan Sezer from comment #6) > Can you point to the exact part(s) of the patch which fixes > that issue? It's a global problem that can't be just quickly fixed. I did the major rework of the parse which together with avoiding a stuck, adds support for formats is previously didn't supported. I did a check, and there are s8 AIFF files making a stuck, u8 won't work, other AIFF files also won't work. BTW, I have found a commit on MixerX side which explains the stuck fix with AIFF files and the reason if them: https://github.com/WohlSoft/SDL-Mixer-X/commit/d3dfe0a8abb400e1913d6125cea49ac0adf42521 I see. (Is it me, or does this bugzilla not send me email even if I'm on the CC list?) (In reply to Ozkan Sezer from comment #8) > I see. > > (Is it me, or does this bugzilla not send me email even if I'm > on the CC list?) We are both in CC list, I also didn't receive any emails of this... (In reply to Vitaly Novichkov from comment #9) > (In reply to Ozkan Sezer from comment #8) > > (Is it me, or does this bugzilla not send me email even if I'm > > on the CC list?) > > We are both in CC list, I also didn't receive any emails of this... Not just this one: I haven't been receiving emails for other bugs which I'm on CC list. (Possibly you, too.) Created attachment 4087 [details]
Extended support for WAV and AIFF
Just now I have updated the code: I have replaced alien code with SDL_wave.c's one. Should be okay now.
This seems good to me. Ozkan, can you coordinate this with the other changes going into SDL_mixer? - Edited the commit message a bit, removed the stale MIT-license notice - Fixed warning by removing unused local var chunk_buffer: music_wav.c: In function 'LoadAIFFMusic': music_wav.c:891: warning: unused variable 'chunk_buffer' - Fixed build failure in ALAW_To_PCM16() by replacing u_val with a_val when SDL_WAVE_LAW_LUT is defined (please confirm.) Pushed as: https://hg.libsdl.org/SDL_mixer/rev/ae77864d2fa7 Question: Do we want to define SDL_WAVE_LAW_LUT or not? > Question: Do we want to define SDL_WAVE_LAW_LUT or not?
Sam, Ryan: We don't define SDL_WAVE_LAW_LUT in SDL2/SDL_wave.c,
either. Is there a reason? It should be the fastest path, no?
(In reply to Ozkan Sezer from comment #14) > > Question: Do we want to define SDL_WAVE_LAW_LUT or not? > > Sam, Ryan: We don't define SDL_WAVE_LAW_LUT in SDL2/SDL_wave.c, > either. Is there a reason? It should be the fastest path, no? PING? The question is for both SDL and for SDL_mixer. This can be closed (SDL_WAVE_LAW_LUT definition is not that relevant.) |