| Summary: | MP3 playback via SMPEG doesn't compile; crashes | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Ralph Versteegen <teeemcee> |
| Component: | misc | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED ABANDONED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | admin, sezeroz |
| Version: | 2.0.2 | ||
| Hardware: | All | ||
| OS: | All | ||
I think, it's no more actual since SMPEG support has been completely removed recently. So, SDL Mixer now supports libMAD and MPG123 libraries only for MP3 playback. Build was fixed by https://hg.libsdl.org/SDL_mixer/rev/b56dbe75cac8 then the smpeg support was removed completely. Closing as abandoned. |
The smpeg interface (--enable-music-mp3 --enable-music-mp3-smpeg) no longer compiles, since the recent refactoring. Here's a fix for that: --- a/music_smpeg.c Tue Dec 12 22:32:02 2017 -0800 +++ b/music_smpeg.c Sat Jan 20 18:28:23 2018 +1300 @@ -138,7 +138,7 @@ SDL_free(music); return NULL; } - smpeg.SMPEG_actualSpec(mp3, &music_spec); + smpeg.SMPEG_actualSpec(music->mp3, &music_spec); music->freesrc = freesrc; return music; @@ -172,7 +172,7 @@ Uint8 *stream = (Uint8 *)data; int len = bytes; int left = (len - smpeg.SMPEG_playAudio(music->mp3, stream, len)); - if (left > 0) { + if (left > 0) stream += (len - left); return left; } However, with this patch applied it compiles but immediately crashes when attempting to play any mp3 file (tested only on 32 bit Windows). Also, note the suspicious lines above if (left > 0) { stream += (len - left); which were added in r798 but do nothing. Even wit