Unverified Commit f219caec authored by Kurtis Dinelle's avatar Kurtis Dinelle Committed by GitHub
Browse files

Merge pull request #5 from phcoder/freq

Fix formula for audio pitch
parents 7118601a 0b8ccb00
......@@ -1204,5 +1204,5 @@ void chip8_skip_instr(CHIP8 *chip8)
double chip8_get_sound_freq(CHIP8 *chip8)
{
// Formula to convert pitch to frequency.
return 4000 * pow(2, (chip8->pitch - 64) / 48);
return 4000 * pow(2.0, (chip8->pitch - 64.0) / 48.0);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment