diff options
Diffstat (limited to 'src/emu/sound/es8712.c')
-rw-r--r-- | src/emu/sound/es8712.c | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/src/emu/sound/es8712.c b/src/emu/sound/es8712.c index 2464837cfc0..b074b6c32fb 100644 --- a/src/emu/sound/es8712.c +++ b/src/emu/sound/es8712.c @@ -15,28 +15,28 @@ #include "emu.h" #include "es8712.h" -#define MAX_SAMPLE_CHUNK 10000 +#define MAX_SAMPLE_CHUNK 10000 /* struct describing a playing ADPCM chip */ struct es8712_state { - UINT8 playing; /* 1 if we're actively playing */ + UINT8 playing; /* 1 if we're actively playing */ - UINT32 base_offset; /* pointer to the base memory location */ - UINT32 sample; /* current sample number */ - UINT32 count; /* total samples to play */ + UINT32 base_offset; /* pointer to the base memory location */ + UINT32 sample; /* current sample number */ + UINT32 count; /* total samples to play */ - UINT32 signal; /* current ADPCM signal */ - UINT32 step; /* current ADPCM step */ + UINT32 signal; /* current ADPCM signal */ + UINT32 step; /* current ADPCM step */ - UINT32 start; /* starting address for the next loop */ - UINT32 end; /* ending address for the next loop */ - UINT8 repeat; /* Repeat current sample when 1 */ + UINT32 start; /* starting address for the next loop */ + UINT32 end; /* ending address for the next loop */ + UINT8 repeat; /* Repeat current sample when 1 */ INT32 bank_offset; - UINT8 *region_base; /* pointer to the base of the region */ - sound_stream *stream; /* which stream are we playing on? */ + UINT8 *region_base; /* pointer to the base of the region */ + sound_stream *stream; /* which stream are we playing on? */ }; /* step size index shift table */ @@ -84,9 +84,9 @@ static void compute_tables(void) { diff_lookup[step*16 + nib] = nbl2bit[nib][0] * (stepval * nbl2bit[nib][1] + - stepval/2 * nbl2bit[nib][2] + - stepval/4 * nbl2bit[nib][3] + - stepval/8); + stepval/2 * nbl2bit[nib][2] + + stepval/4 * nbl2bit[nib][3] + + stepval/8); } } } @@ -358,22 +358,22 @@ WRITE8_DEVICE_HANDLER( es8712_w ) es8712_state *chip = get_safe_token(device); switch (offset) { - case 00: chip->start &= 0x000fff00; + case 00: chip->start &= 0x000fff00; chip->start |= ((data & 0xff) << 0); break; - case 01: chip->start &= 0x000f00ff; + case 01: chip->start &= 0x000f00ff; chip->start |= ((data & 0xff) << 8); break; - case 02: chip->start &= 0x0000ffff; + case 02: chip->start &= 0x0000ffff; chip->start |= ((data & 0x0f) << 16); break; - case 03: chip->end &= 0x000fff00; + case 03: chip->end &= 0x000fff00; chip->end |= ((data & 0xff) << 0); break; - case 04: chip->end &= 0x000f00ff; + case 04: chip->end &= 0x000f00ff; chip->end |= ((data & 0xff) << 8); break; - case 05: chip->end &= 0x0000ffff; + case 05: chip->end &= 0x0000ffff; chip->end |= ((data & 0x0f) << 16); break; case 06: es8712_play(device); break; - default: break; + default: break; } chip->start &= 0xfffff; chip->end &= 0xfffff; } @@ -382,7 +382,7 @@ const device_type ES8712 = &device_creator<es8712_device>; es8712_device::es8712_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, ES8712, "ES8712", tag, owner, clock), - device_sound_interface(mconfig, *this) + device_sound_interface(mconfig, *this) { m_token = global_alloc_clear(es8712_state); } @@ -424,5 +424,3 @@ void es8712_device::sound_stream_update(sound_stream &stream, stream_sample_t ** // should never get here fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); } - - |