Migrate some floating point code to fixed point in libgme.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30493 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2011-09-10 02:52:12 +00:00
parent 559e0e10f8
commit e8dc7a6d07
5 changed files with 14 additions and 15 deletions

View file

@ -494,8 +494,8 @@ void OPL_setSampleRate(struct Y8950* this, int sampleRate, int clockRate)
makeDphaseARTable(sampleRate, clockRate);
makeDphaseDRTable(sampleRate, clockRate);
makeDphaseNoiseTable(sampleRate, clockRate);
this->pm_dphase = rate_adjust(PM_SPEED * PM_DP_WIDTH / (clockRate/72), sampleRate, clockRate);
this->am_dphase = rate_adjust(AM_SPEED * AM_DP_WIDTH / (clockRate/72), sampleRate, clockRate);
this->pm_dphase = rate_adjust( (int)(PM_SPEED * PM_DP_WIDTH) / (clockRate/72), sampleRate, clockRate);
this->am_dphase = rate_adjust( (int)(AM_SPEED * AM_DP_WIDTH) / (clockRate/72), sampleRate, clockRate);
}
// Reset whole of opl except patch datas.