Some minor changes to VideoCommon, improved SawWave sound, the denied sound in ZWW sounds better (compared it to real HW to be sure).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3810 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
omegadox
2009-07-15 21:26:49 +00:00
parent 03e434b91a
commit a73dd21ee9
4 changed files with 19 additions and 12 deletions

View File

@ -15,6 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#include <math.h>
#include "../Globals.h"
#include "UCodes.h"
#include "UCode_Zelda.h"
@ -95,10 +97,11 @@ _lRestart:
void CUCode_Zelda::RenderSynth_SawWave(ZeldaVoicePB &PB, s32* _Buffer, int _Size)
{
s32 ratio = PB.RatioInt * 2;
s32 ratio = (s32)ceil((float)PB.RatioInt / 3);
s64 pos = PB.CurSampleFrac;
for (int i = 0; i < 0x50; i++) {
for (int i = 0; i < _Size; i++)
{
pos += ratio;
_Buffer[i] = pos & 0xFFFF;
}