libSDL2pp / libSDL2pp

C++ bindings/wrapper for SDL2
https://sdl2pp.amdmi3.ru
Other
562 stars 89 forks source link

Mix_Init: MP3 support not available #123

Closed ryancheung closed 6 years ago

ryancheung commented 6 years ago

Keep raise this in macOS, anyone help?

Code:

    int result = 0;
    int flags = MIX_INIT_MP3;

    if (SDL_Init(SDL_INIT_AUDIO) < 0) {
        printf("Failed to init SDL\n");
        exit(1);
    }

    if (flags != (result = Mix_Init(flags))) {
        printf("Could not initialize mixer (result: %d).\n", result);
        printf("Mix_Init: %s\n", Mix_GetError());
        exit(1);
    }
AMDmi3 commented 6 years ago

Please submit SDL problems upstream.

ryancheung commented 6 years ago

In case someone has this frustrating problem, go https://github.com/veandco/go-sdl2/issues/299 to get helped.

ryancheung commented 6 years ago

For the latest homebrew, run brew install sdl2_mixer --with-mpg123 can fix all these trouble.

jdavid5815 commented 4 years ago

I can't seen to use that brew option:

Error: invalid option: --with-mpg123

Update brew and made sure that mpg123 was installed .. to no avail.