Skip to content

SDL2: mpg123 sample rate issue starting with libSDL2-2.0.so.0.3000.52 #501

@ahmogit

Description

@ahmogit

Starting with libSDL2-2.0.so.0.3000.52, mpg123 using output module sdl, driving pulseaudio produces highly distorted output.

By ear, the failure mode sounds like a sampling rate issue. My guess is sampling too fast, skipping samples, or overrunning the PA socket.

To reproduce:

 $ mpg123 -o sdl audiofile.mp3

with pulseaudio running.

When run with any of the failing libs (see bisection list below), the time to complete playing an audio track -- i.e. the time for the mpg123 process to finish -- is roughly 1/3 the actual length of the track. This is consistent with the above guess that mpg123 is probably overrunning the PA socket or something like that.

Problem is 100% reproducible on my setup.

Version info:

 OS:            Arch Linux, recenly synched to repos.
 kernel:        6.1.68-1-lts
 mpg123:        1.33.0
 pulseaudio:    17.0-43-g3e2bb     
LD_PRELOAD bisection:

    SDL2 library version         Arch package ID
    ====================         ===============

 Works:
    libSDL2-2.0.so.0.3000.7      sdl2-2.30.7-1
    libSDL2-2.0.so.0.3000.8      sdl2-2.30.8-1
    libSDL2-2.0.so.0.3000.9      sdl2-2.30.9-1
    libSDL2-2.0.so.0.3000.50     sdl2-compat-2.30.50-1
    libSDL2-2.0.so.0.3000.50     sdl2-compat-2.30.50-2
    libSDL2-2.0.so.0.3000.51     sdl2-compat-2.30.51-1

 Fails:
    libSDL2-2.0.so.0.3000.52     sdl2-compat-2.30.52-1
    libSDL2-2.0.so.0.3000.54     sdl2-compat-2.30.54-1
    libSDL2-2.0.so.0.3200.56     2.32.56-1

Activity

ahmogit

ahmogit commented on Jun 24, 2025

@ahmogit
Author

Closed (unintentional duplicate of #500).

transferred this issue fromlibsdl-org/SDLon Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ahmogit

        Issue actions

          SDL2: mpg123 sample rate issue starting with libSDL2-2.0.so.0.3000.52 · Issue #501 · libsdl-org/sdl2-compat