Systematically eliminating compiler warnings.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5117 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2010-02-24 03:38:36 +00:00
commit 1d40b8a5ae
26 changed files with 74 additions and 67 deletions

View file

@ -26,13 +26,14 @@
void CUCode_Zelda::RenderSynth_RectWave(ZeldaVoicePB &PB, s32* _Buffer, int _Size)
{
float ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
float _ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
u32 _ratio = (PB.RatioInt << 16);
s64 ratio = (_ratio * ratioFactor) * 16;
s64 ratio = (_ratio * _ratioFactor) * 16;
s64 TrueSamplePosition = PB.CurSampleFrac;
// PB.Format == 0x3 -> Rectangular Wave, 0x0 -> Square Wave
int mask = PB.Format ? 3 : 1, shift = PB.Format ? 2 : 1;
unsigned int mask = PB.Format ? 3 : 1;
// int shift = PB.Format ? 2 : 1; // Unused?
u32 pos[2] = {0, 0};
int i = 0;

View file

@ -60,9 +60,9 @@ void CUCode_Zelda::WritebackVoicePB(u32 _Addr, ZeldaVoicePB& PB)
int CUCode_Zelda::ConvertRatio(int pb_ratio)
{
float ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
float _ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
u32 _ratio = (pb_ratio << 16);
return (u64)((_ratio * ratioFactor) * 16) >> 16;
return (u64)((_ratio * _ratioFactor) * 16) >> 16;
}
int CUCode_Zelda::SizeForResampling(ZeldaVoicePB &PB, int size, int ratio) {
@ -648,7 +648,7 @@ ContinueWithBlock:
// The 8 buffers to mix to: 0d00, 0d60, 0f40 0ca0 0e80 0ee0 0c00 0c50
// We just mix to the first two and call it stereo :p
int value = b00[0x4 + count];
int delta = b00[0xC + count] << 11;
//int delta = b00[0xC + count] << 11; // Unused?
int ramp = value << 16;
for (int i = 0; i < _Size; i++)