diff options
Diffstat (limited to 'src/devices/sound/i5000.cpp')
-rw-r--r-- | src/devices/sound/i5000.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/devices/sound/i5000.cpp b/src/devices/sound/i5000.cpp index 7c8a19111fc..9c599651925 100644 --- a/src/devices/sound/i5000.cpp +++ b/src/devices/sound/i5000.cpp @@ -44,7 +44,7 @@ void i5000snd_device::device_start() m_lut_volume[0xff] = 0; // create the stream - m_stream = machine().sound().stream_alloc(*this, 0, 2, clock() / 0x400); + m_stream = stream_alloc(0, 2, clock() / 0x400); m_rom_base = (uint16_t *)device().machine().root_device().memregion(":i5000snd")->base(); m_rom_mask = device().machine().root_device().memregion(":i5000snd")->bytes() / 2 - 1; @@ -114,9 +114,9 @@ bool i5000snd_device::read_sample(int ch) } -void i5000snd_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +void i5000snd_device::sound_stream_update(sound_stream &stream) { - for (int i = 0; i < samples; i++) + for (int i = 0; i < stream.samples(); i++) { int32_t mix_l = 0; int32_t mix_r = 0; @@ -157,8 +157,8 @@ void i5000snd_device::sound_stream_update(sound_stream &stream, stream_sample_t mix_l += m_channels[ch].output_l; } - outputs[0][i] = mix_r / 16; - outputs[1][i] = mix_l / 16; + stream.put_int(0, i, mix_r, 32768 * 16); + stream.put_int(1, i, mix_l, 32768 * 16); } } @@ -224,6 +224,7 @@ void i5000snd_device::write_reg16(uint8_t reg, uint16_t data) default: logerror("i5000snd: channel %d unknown sample param %04X!\n", ch, param); // fall through (take settings from 0x0184) + [[fallthrough]]; // 4-bit ADPCM case 0x0184: m_channels[ch].freq_min = 0x100; @@ -266,7 +267,7 @@ void i5000snd_device::write_reg16(uint8_t reg, uint16_t data) } -READ16_MEMBER( i5000snd_device::read ) +uint16_t i5000snd_device::read(offs_t offset) { uint16_t ret = 0; m_stream->update(); @@ -291,7 +292,7 @@ READ16_MEMBER( i5000snd_device::read ) } -WRITE16_MEMBER( i5000snd_device::write ) +void i5000snd_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (mem_mask != 0xffff) { |