SDL_mixer icon indicating copy to clipboard operation
SDL_mixer copied to clipboard

Support wav-files with MPEG encoding with mpg123

Open maxmitti opened this issue 2 years ago • 3 comments

(lib)mpg123 can play wav-files with MPEG encoded data. It would be useful if SDL_mixer could support those types as well if mpg123 is enabled. Here is such a file.

patch.patch.txt includes a hack which enables this feature for Mix_LoadWAV_RW to show that it is possible.

maxmitti avatar Apr 17 '22 20:04 maxmitti

I guess we should detect WAVE_FORMAT_MPEGLAYER3 (0x55) audio format tag in music_wav.c, seek to the data chunk and somehow 'forward' the SDLRW to a mp3 decoder built into SDL_mixer.

sezero avatar Apr 17 '22 21:04 sezero

Would it make sense to expose the audio format tag extraction from SDL for this? Maybe also something which seeks to the data chunk or returns the offset of the data chunk?

maxmitti avatar Apr 19 '22 15:04 maxmitti

Possibly too late for 2.6.0. Mark for 2.8.0?

sezero avatar Jun 17 '22 06:06 sezero