ddnet / ddnet

DDraceNetwork, a free cooperative platformer game
https://ddnet.org
Other
591 stars 417 forks source link

Sound is broken on Windows #1371

Closed def- closed 6 years ago

def- commented 6 years ago

I guess it's the SDL2 update, seems weird in Wine.

def- commented 6 years ago

Doesn't look t hat bad when initializing either:

0045:fixme:msctf:ThreadMgrSource_AdviseSink (0xb67d0) Unhandled Sink: {ea1ea136-19df-11d7-a6d2-00065b84435c}
0045:fixme:imm:NotifyIME NI_CLOSECANDIDATE
0045:fixme:msctf:ThreadMgrSource_AdviseSink (0xb67d0) Unhandled Sink: {ea1ea136-19df-11d7-a6d2-00065b84435c}
004b:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",0x214fcdc): stub
[2018-11-01 14:19:28][client/sound]: sound init successful
xse commented 6 years ago

Confirmed on windows.

def- commented 6 years ago

Anyone who can test if just dropping in the old SDL2 version fixes it? Or SDL 2.0.9 that was just released?

edg-l commented 6 years ago

Dropping SDL 2.0.5 fixed it for me. I couldn't try with 2.0.6 2.0.7 because i can't find where to download them.

2.0.9 doesn't fix it.

2.0.6 added this on windows:

The new default audio driver on Windows is WASAPI and supports hot-plugging devices and changing the default audio device The old XAudio2 audio driver is deprecated and will be removed in the next release

2.0.7:

Added audio stream conversion functions: SDL_NewAudioStream SDL_AudioStreamPut SDL_AudioStreamGet SDL_AudioStreamAvailable SDL_AudioStreamFlush SDL_AudioStreamClear SDL_FreeAudioStream

2.0.8 removed the XAudio2 implementation mentioned in 2.0.6

https://discourse.libsdl.org/t/sdl-2-0-6-released/23109/8 here you can see people also complaining about the sound.

Edit:

That’s to be expected. I believe the new audio device (WASAPI ) is F32 only,

I think teeworlds uses S16 https://github.com/ddnet/ddnet/blob/master/src/engine/client/sound.cpp#L307

https://discourse.libsdl.org/t/sdl-2-0-6-released/23109/12