shithub: choc

Download patch

ref: c53762058b2d38fe68b1f538cb11c9b4081a97e2
parent: 64918568eee62c73cbb87aa1bd68e191f19a4af3
author: Simon Howard <[email protected]>
date: Tue Aug 31 15:59:24 EDT 2010

Don't double OPL sample values, as it causes horrible things to happen
with the Heretic title screen music.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1988

--- a/opl/opl_sdl.c
+++ b/opl/opl_sdl.c
@@ -176,8 +176,8 @@
 
     for (i=0; i<nsamples; ++i)
     {
-        buffer[i * 2] = (int16_t) (mix_buffer[i] * 2);
-        buffer[i * 2 + 1] = (int16_t) (mix_buffer[i] * 2);
+        buffer[i * 2] = (int16_t) mix_buffer[i];
+        buffer[i * 2 + 1] = (int16_t) mix_buffer[i];
     }
 }