From 676c90a0f00bd04a1af80c7038efbb4c43381ef4 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 28 Sep 2009 00:11:36 +0000 Subject: [PATCH] add new "random" mic noise which needed updating since the code which returns samples to the game software was corrected --- desmume/src/windows/mic.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/desmume/src/windows/mic.cpp b/desmume/src/windows/mic.cpp index 688fb7fc2..b52def52c 100644 --- a/desmume/src/windows/mic.cpp +++ b/desmume/src/windows/mic.cpp @@ -168,9 +168,12 @@ void Mic_DeInit() waveInClose(waveIn); } -static const int random[32] = {0xB1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x70, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28, 0x00, 0x00, 0x00, -0x00, 0x00, 0x20, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9}; +static const u8 random[32] = +{ + 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0xFF, 0xFF, 0xFF, 0xFF, 0x8E, 0xFF, + 0xF4, 0xE1, 0xBF, 0x9A, 0x71, 0x58, 0x5B, 0x5F, 0x62, 0xC2, 0x25, 0x05, 0x01, 0x01, 0x01, 0x01, +} ; + u8 Mic_ReadSample() @@ -195,7 +198,6 @@ u8 Mic_ReadSample() } else { //use the "random" values tmp = random[micReadSamplePos >> 1]; - //tmp = rand()&0xFF; micReadSamplePos++; if(micReadSamplePos == ARRAY_SIZE(random)*2) micReadSamplePos=0;