mupen64plus / mupen64plus-user-issues

Issue reports from users go here
http://www.mupen64plus.org/
17 stars 3 forks source link

No audio self compiled Windows #692

Open Danfun64 opened 6 years ago

Danfun64 commented 6 years ago

I'd have put this bug report in mupen64plus-audio-sdl if it weren't for the fact that you can't post bug reports there for some reason.

I don't know why, but I'm not getting any audio when using a MSYS2/MinGW-W64 self compiled dll of mupen64plus-audio-sdl. It compiles just fine. The only thing i'm sure of is that the "Obtained audio format/frequency differs from requested."

Any suggestions?

Danfun64 commented 6 years ago

Actually, I don't think this issue is with mupen64plus-audio-sdl but sdl in general...

edit: Confirmed, the issue was solved when I downgraded my SDL2 binary from 2.0.6-1 to 2.0.5-2

loganmc10 commented 6 years ago

It's not a bug in SDL, it is an issue with mupen64plus-audio-sdl

SDL 2.0.6 changed the audio backend on Windows to WASAPI, with that change, the audio format is forced to 32bit floating point samples. Audio-sdl only outputs 16 bit integer samples currently, so it needs to convert the samples to the proper format before feeding them to SDL

Zapeth commented 6 years ago

As a workaround you can call the SDL_OpenAudio() function in sdl_backend.c with parameter NULL instead of &obtained (and also set obtained = desired to avoid problems in the following checks).

This forces SDL to use the specified audio settings (and deals with the conversion specifics internally), as described in the SDL wiki -> https://wiki.libsdl.org/SDL_OpenAudio