aboutsummaryrefslogtreecommitdiff
path: root/source/apu.c
diff options
context:
space:
mode:
authorJoão Silva2017-01-29 04:55:23 +0000
committerJoão Silva2017-01-29 04:55:23 +0000
commit0e59b999fa976de2d00490f552a1ff0a27d40f63 (patch)
treeadce7b06d1acc25f52c6e10616451bba02f9f7a5 /source/apu.c
parent813fc89d37d1d8c8d2fa090a28f74aa0fdcea5df (diff)
downloadsnes9x2005-0e59b999fa976de2d00490f552a1ff0a27d40f63.tar.gz
snes9x2005-0e59b999fa976de2d00490f552a1ff0a27d40f63.tar.bz2
snes9x2005-0e59b999fa976de2d00490f552a1ff0a27d40f63.zip
Converted most types to stdint-style (fixing a few in the process).
Diffstat (limited to 'source/apu.c')
-rw-r--r--source/apu.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/apu.c b/source/apu.c
index 1ac4c06..a28469d 100644
--- a/source/apu.c
+++ b/source/apu.c
@@ -27,7 +27,7 @@ void S9xDeinitAPU()
{
if (IAPU.RAM)
{
- free((char*) IAPU.RAM);
+ free(IAPU.RAM);
IAPU.RAM = NULL;
}
}
@@ -36,7 +36,7 @@ uint8_t APUROM [64];
void S9xResetAPU()
{
- int i, j;
+ int32_t i, j;
Settings.APUEnabled = true;
@@ -104,7 +104,7 @@ void S9xSetAPUDSP(uint8_t byte)
uint8_t reg = IAPU.RAM [0xf2];
static uint8_t KeyOn;
static uint8_t KeyOnPrev;
- int i;
+ int32_t i;
switch (reg)
{
@@ -133,11 +133,11 @@ void S9xSetAPUDSP(uint8_t byte)
case APU_NON:
if (byte != APU.DSP [APU_NON])
{
- int c;
+ int32_t c;
uint8_t mask = 1;
for (c = 0; c < 8; c++, mask <<= 1)
{
- int type;
+ int32_t type;
if (byte & mask)
type = SOUND_NOISE;
@@ -169,7 +169,7 @@ void S9xSetAPUDSP(uint8_t byte)
break;
case APU_KOFF:
{
- int c;
+ int32_t c;
uint8_t mask = 1;
for (c = 0; c < 8; c++, mask <<= 1)
{
@@ -199,7 +199,7 @@ void S9xSetAPUDSP(uint8_t byte)
case APU_KON:
if (byte)
{
- int c;
+ int32_t c;
uint8_t mask = 1;
for (c = 0; c < 8; c++, mask <<= 1)
{
@@ -327,7 +327,7 @@ void S9xSetAPUDSP(uint8_t byte)
APU.DSP [reg] = byte;
}
-void S9xFixEnvelope(int channel, uint8_t gain, uint8_t adsr1, uint8_t adsr2)
+void S9xFixEnvelope(int32_t channel, uint8_t gain, uint8_t adsr1, uint8_t adsr2)
{
if (adsr1 & 0x80) // ADSR mode
{