PCE: improve noise channel

This commit is contained in:
beirich 2011-01-31 07:19:38 +00:00
parent 4fd27db1b2
commit 27da793b5f
2 changed files with 3 additions and 2 deletions

View File

@ -167,7 +167,8 @@ namespace BizHawk.Emulation.Sound
freq = channel.NoiseFreq;
}
float adjustedWaveLengthInSamples = SampleRate / (channel.NoiseChannel ? freq/(float)channel.Wave.Length : freq);
float adjustedWaveLengthInSamples = SampleRate / (channel.NoiseChannel ? freq/(float)(channel.Wave.Length*128) : freq);
float moveThroughWaveRate = wave.Length / adjustedWaveLengthInSamples;
int end = start + len;

View File

@ -23,7 +23,7 @@
PeriodicWave16 = new short[] { 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
NoiseWave = new short[0x2000];
NoiseWave = new short[0x1000];
var rnd = new System.Random(unchecked((int)0xDEADBEEF));
for (int i = 0; i < NoiseWave.Length; i++)
{