We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4969 - end of mp3 is cut off depending on chunksize
Summary: end of mp3 is cut off depending on chunksize
Status: NEW
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.4
Hardware: x86_64 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-07 00:18 UTC by Sven
Modified: 2020-10-26 16:51 UTC (History)
2 users (show)

See Also:


Attachments
sdl.py (1.28 KB, text/x-python)
2020-02-07 00:18 UTC, Sven
Details
the mp3 file (13.73 KB, application/octet-stream)
2020-02-07 00:19 UTC, Sven
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven 2020-02-07 00:18:56 UTC
Created attachment 4194 [details]
sdl.py

So find attached a very simple test program (python, PySDL2 0.9.6) that loads and plays an mp3. The mp3 is the sound of somebody saying "Please play this message". If the chunksize passed to Mix_OpenAudio is 8192, the problem is most severe. The end of the word "message" is cut off. If I change the chunksize to 4096, the problem is less severe. In both cases, I assume that the last chunk of the mp3 is not played. The larger the chunksize, the more of the mp3 is not played.

This should not happen, regardless of the chunksize.

If I change the chunksize to 4000, I can work around the problem. I assume, there might be mp3 files for which the problem will persists.

Sorry that the program is python. I'm on Arch Linux using sdl2_mixer 2.0.4-3 and python-pysdl2 0.9.6-4 from Arch's AUR. As far as I can see, python is a rather thin layer on top the C API. So I assume the bug persists if I would rewrite the program in C.
Comment 1 Sven 2020-02-07 00:19:41 UTC
Created attachment 4195 [details]
the mp3 file