This is an automated email from the git hooks/post-receive script. ecsv-guest pushed a commit to branch armhf_test in repository mupen64plus-audio-sdl.
commit 90c43167fc151224432bc4f6c6e39210e4730e94 Author: Sven Eckelmann <[email protected]> Date: Tue Jun 11 10:51:15 2013 +0200 Initialize audiobuffer before mixing it against our data --- debian/changelog | 3 +++ debian/patches/initialize_audiobuffer.patch | 27 +++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 31 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3de2758..85b059b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ mupen64plus-audio-sdl (2.0~rc2+1+ad849b6b7b69-2) UNRELEASED; urgency=low - Switch from SDL 1.2 to SDL 2.0 * debian/control: - Depend on libsdl2-dev instead of libsdl1.2-dev + * debian/patches: + - Add initialize_audiobuffer.patch, Initialize audiobuffer before mixing it + against our data -- Sven Eckelmann <[email protected]> Sun, 09 Jun 2013 22:22:33 +0200 diff --git a/debian/patches/initialize_audiobuffer.patch b/debian/patches/initialize_audiobuffer.patch new file mode 100644 index 0000000..1fe013a --- /dev/null +++ b/debian/patches/initialize_audiobuffer.patch @@ -0,0 +1,27 @@ +Description: Initialize audiobuffer before mixing it against our data + SDL doesn't guarantee that the target audio buffer passed in its callback is + initialized to zero (silence). SDL_MixAudio may now try to mix the random data + from the dst buffer and the new data from the src buffer together and creating + distorted sound in this process. +Author: Sven Eckelmann <[email protected]> + +--- +diff --git a/src/main.c b/src/main.c +index ff5e31983fd9ac4f3dfda1e7bd3eb2db1a9aeb33..e116c7376064013da69e5844ca94cbbb143862a2 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -597,13 +597,9 @@ static void my_audio_callback(void *userdata, unsigned char *stream, int len) + else + #endif + { +-#if SDL_VERSION_ATLEAST(1,3,0) +-#warning Mixing disabled with SDL >= 1.3 because it creates distorted audio +- input_used = resample(primaryBuffer, buffer_pos, oldsamplerate, stream, len, newsamplerate); +-#else + input_used = resample(primaryBuffer, buffer_pos, oldsamplerate, mixBuffer, len, newsamplerate); ++ memset(stream, 0, len); + SDL_MixAudio(stream, mixBuffer, len, VolSDL); +-#endif + } + memmove(primaryBuffer, &primaryBuffer[input_used], buffer_pos - input_used); + buffer_pos -= input_used; diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0819e18 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +initialize_audiobuffer.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-audio-sdl.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

