From 07624f6012a39f43c421616e6753a8bd2a827cb4 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 17 Mar 2022 18:15:44 -0500 Subject: [PATCH] fix DPCM to 16-bit --- src/engine/sample.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/sample.cpp b/src/engine/sample.cpp index 571e35118..04bdb91eb 100644 --- a/src/engine/sample.cpp +++ b/src/engine/sample.cpp @@ -162,7 +162,7 @@ void DivSample::render() { case 1: { // DPCM int accum=0; for (unsigned int i=0; i>3]>>(i&7))&1)?1:-1; + accum+=((dataDPCM[i>>3]>>(i&7))&1)?1:-1; if (accum>63) accum=63; if (accum<-64) accum=-64; data16[i]=accum*512;