summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/x1_010.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
commitddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch)
treea70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/devices/sound/x1_010.cpp
parent333bff8de64dfaeb98134000412796b4fdef970b (diff)
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/devices/sound/x1_010.cpp')
-rw-r--r--src/devices/sound/x1_010.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/devices/sound/x1_010.cpp b/src/devices/sound/x1_010.cpp
index e1689df139c..377a229e0cb 100644
--- a/src/devices/sound/x1_010.cpp
+++ b/src/devices/sound/x1_010.cpp
@@ -85,7 +85,7 @@ struct X1_010_CHANNEL {
const device_type X1_010 = &device_creator<x1_010_device>;
-x1_010_device::x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+x1_010_device::x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, X1_010, "X1-010", tag, owner, clock, "x1_010", __FILE__),
device_sound_interface(mconfig, *this),
m_region(*this, DEVICE_SELF),
@@ -168,7 +168,7 @@ WRITE8_MEMBER( x1_010_device::write )
READ16_MEMBER( x1_010_device::word_r )
{
- UINT16 ret;
+ uint16_t ret;
ret = m_HI_WORD_BUF[offset]<<8;
ret += (read( space, offset )&0xff);
@@ -192,9 +192,9 @@ void x1_010_device::sound_stream_update(sound_stream &stream, stream_sample_t **
{
X1_010_CHANNEL *reg;
int ch, i, volL, volR, freq, div;
- INT8 *start, *end, data;
- UINT8 *env;
- UINT32 smp_offs, smp_step, env_offs, env_step, delta;
+ int8_t *start, *end, data;
+ uint8_t *env;
+ uint32_t smp_offs, smp_step, env_offs, env_step, delta;
// mixer buffer zero clear
memset( outputs[0], 0, samples*sizeof(*outputs[0]) );
@@ -218,7 +218,7 @@ void x1_010_device::sound_stream_update(sound_stream &stream, stream_sample_t **
// Meta Fox does write the frequency register, but this is a hack to make it "work" with the current setup
// This is broken for Arbalester (it writes 8), but that'll be fixed later.
if( freq == 0 ) freq = 4;
- smp_step = (UINT32)((float)m_base_clock/8192.0f
+ smp_step = (uint32_t)((float)m_base_clock/8192.0f
*freq*(1<<FREQ_BASE_BITS)/(float)m_rate);
if( smp_offs == 0 ) {
LOG_SOUND(( "Play sample %p - %p, channel %X volume %d:%d freq %X step %X offset %X\n",
@@ -238,14 +238,14 @@ void x1_010_device::sound_stream_update(sound_stream &stream, stream_sample_t **
}
m_smp_offset[ch] = smp_offs;
} else { // Wave form
- start = (INT8 *)&(m_reg[reg->volume*128+0x1000]);
+ start = (int8_t *)&(m_reg[reg->volume*128+0x1000]);
smp_offs = m_smp_offset[ch];
freq = ((reg->pitch_hi<<8)+reg->frequency)>>div;
- smp_step = (UINT32)((float)m_base_clock/128.0f/1024.0f/4.0f*freq*(1<<FREQ_BASE_BITS)/(float)m_rate);
+ smp_step = (uint32_t)((float)m_base_clock/128.0f/1024.0f/4.0f*freq*(1<<FREQ_BASE_BITS)/(float)m_rate);
- env = (UINT8 *)&(m_reg[reg->end*128]);
+ env = (uint8_t *)&(m_reg[reg->end*128]);
env_offs = m_env_offset[ch];
- env_step = (UINT32)((float)m_base_clock/128.0f/1024.0f/4.0f*reg->start*(1<<ENV_BASE_BITS)/(float)m_rate);
+ env_step = (uint32_t)((float)m_base_clock/128.0f/1024.0f/4.0f*reg->start*(1<<ENV_BASE_BITS)/(float)m_rate);
/* Print some more debug info */
if( smp_offs == 0 ) {
LOG_SOUND(( "Play waveform %X, channel %X volume %X freq %4X step %X offset %X\n",