]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a sound conversion bug in mono output
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 25 Nov 2005 23:03:31 +0000 (23:03 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 25 Nov 2005 23:03:31 +0000 (23:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5838 d7cf8633-e32d-0410-b094-e92efae38249

snd_mix.c

index f4a857d3dec212297774fbcb8fd216c94aa9e61d..7aef154ee0db5173bccda01ebca71192eb7da54e 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -303,7 +303,9 @@ void S_TransferPaintBuffer(int endtime)
                                {
                                        // 1.0 mono
                                        for (i = 0;i < snd_frames;i++, snd_p++)
+                                       {
                                                val = ((snd_p->sample[0]+snd_p->sample[1]) >> 9) + 128;*snd_out++ = bound(0, val, 255);
+                                       }
                                }
                        }
                }