Next time I'll test with sound enabled when attempting to fix a warning in audiolib ;)

git-svn-id: https://svn.eduke32.com/eduke32@4616 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2014-09-30 04:09:03 +00:00
parent ed703142af
commit f8b340de02

View file

@ -50,20 +50,19 @@ void PITCH_Init(void)
int32_t note; int32_t note;
int32_t detune; int32_t detune;
if (!PITCH_Installed) if (PITCH_Installed)
{ return;
for (note = 0; note < 12; note++) for (note = 0; note < 12; note++)
{ {
for (detune = 0; detune < MAXDETUNE; detune++) for (detune = 0; detune < MAXDETUNE; detune++)
{ {
PitchTable[ note ][ detune ] = 0x10000 * PitchTable[note][detune] = (uint32_t) (65535.f * powf(2.f, (note * MAXDETUNE + detune) / (12.f * MAXDETUNE)));
(uint32_t)pow(2, (note * MAXDETUNE + detune) / (12.0 * MAXDETUNE));
} }
} }
PITCH_Installed = 1; PITCH_Installed = 1;
} }
}
/*--------------------------------------------------------------------- /*---------------------------------------------------------------------