Go to file
Kp 524f042659 SDL2: MVE: fix noise from reading undefined sound data
Commit 07245a0bc2 added the SDL_mixer backend for MVE audio.  That
commit set the length of the converted sound equal to the size of the
buffer that SDL requested as a work area.  No one ever touched that
logic, until now.  In SDL1, that choice worked fine.  In SDL2, this
causes garbage to play after the sound, because SDL2 considers the
buffer to be defined only up to the length returned in
`SDL_AudioCVT::cvt_len`.  Bytes beyond that length are undefined[1], and
in practice contain garbage.  Fix the noise by setting the sound length
equal to the length returned by SDL2, so that the undefined bytes are
not treated as sound.  SDL1 also maintains this length value, so no
version-specific logic is required.

[1]: https://wiki.libsdl.org/SDL_ConvertAudio

Reported-by: andrew-strong <https://github.com/dxx-rebirth/dxx-rebirth/issues/398>
2018-08-01 01:18:11 +00:00
common SDL2: set relative mouse mode when grabbing the mouse 2018-07-29 21:17:09 +00:00
contrib Enable building with SDL2 2018-07-28 23:22:58 +00:00
d1x-rebirth Move d2x-rebirth/main/bmread.cpp -> similar/main/bmread.cpp 2018-07-18 04:39:28 +00:00
d2x-rebirth SDL2: MVE: fix noise from reading undefined sound data 2018-08-01 01:18:11 +00:00
Documentation Require support for reference qualified methods 2016-12-10 17:51:07 +00:00
similar SDL2-mixer: fix noise from reading undefined sound data 2018-07-30 00:49:59 +00:00
.gitattributes Add experimental Windows manifest 2017-08-02 02:49:12 +00:00
.gitignore ignore XCode user data 2014-12-06 22:43:12 -08:00
COPYING.txt corrected typo in COPYING.txt (it's to its) 2014-06-06 13:18:52 +02:00
GPL-3.txt Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
INSTALL.markdown Restore GOG reference in INSTALL.markdown 2017-11-25 01:56:51 +00:00
ISSUE_TEMPLATE.md Adjust issue template formatting 2018-04-28 04:36:11 +00:00
SConstruct Enable building with SDL2 2018-07-28 23:22:58 +00:00