Reformatted Pixtone.cpp

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
Gabriel Ravier 2019-06-14 16:52:53 +02:00
parent 473bd43ca7
commit 5ccb7dfa93
No known key found for this signature in database
GPG key ID: 1E75F156884F3DCE

View file

@ -139,13 +139,13 @@ BOOL MakePixelWaveData(const PIXTONEPARAMETER *ptp, unsigned char *pData)
c = (int)dVolume % 256;
d = (int)((double)(i * 0x100) / ptp->size);
pData[i] = gWaveModelTable[ptp->oMain.model][a]
* ptp->oMain.top
/ 64
* (gWaveModelTable[ptp->oVolume.model][c] * ptp->oVolume.top / 64 + 64)
/ 64
* envelopeTable[d]
/ 64
+ 128;
* ptp->oMain.top
/ 64
* (gWaveModelTable[ptp->oVolume.model][c] * ptp->oVolume.top / 64 + 64)
/ 64
* envelopeTable[d]
/ 64
+ 128;
if (gWaveModelTable[ptp->oPitch.model][b] < 0)
dMain = d1 - d1 * 0.5 * -gWaveModelTable[ptp->oPitch.model][b] * ptp->oPitch.top / 64.0 / 64.0 + dMain;