diff options
Diffstat (limited to 'src/devices/sound/es5503.cpp')
-rw-r--r-- | src/devices/sound/es5503.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/devices/sound/es5503.cpp b/src/devices/sound/es5503.cpp index b1881412da2..8103ffbc456 100644 --- a/src/devices/sound/es5503.cpp +++ b/src/devices/sound/es5503.cpp @@ -61,7 +61,7 @@ es5503_device::es5503_device(const machine_config &mconfig, const char *tag, dev : device_t(mconfig, ES5503, "Ensoniq ES5503", tag, owner, clock, "es5503", __FILE__), device_sound_interface(mconfig, *this), device_memory_interface(mconfig, *this), - m_space_config("es5503_samples", ENDIANNESS_LITTLE, 8, 17, 0, NULL, *ADDRESS_MAP_NAME(es5503)), + m_space_config("es5503_samples", ENDIANNESS_LITTLE, 8, 17, 0, nullptr, *ADDRESS_MAP_NAME(es5503)), m_irq_func(*this), m_adc_func(*this) { @@ -74,7 +74,7 @@ es5503_device::es5503_device(const machine_config &mconfig, const char *tag, dev const address_space_config *es5503_device::memory_space_config(address_spacenum spacenum) const { - return (spacenum == 0) ? &m_space_config : NULL; + return (spacenum == 0) ? &m_space_config : nullptr; } //------------------------------------------------- @@ -252,7 +252,7 @@ void es5503_device::device_start() output_rate = (clock()/8)/34; // (input clock / 8) / # of oscs. enabled + 2 m_stream = machine().sound().stream_alloc(*this, 0, output_channels, output_rate); - m_timer = timer_alloc(0, NULL); + m_timer = timer_alloc(0, nullptr); m_timer->adjust(attotime::from_hz(output_rate), 0, attotime::from_hz(output_rate)); } @@ -260,18 +260,18 @@ void es5503_device::device_reset() { rege0 = 0xff; - for (int osc = 0; osc < 32; osc++) + for (auto & elem : oscillators) { - oscillators[osc].freq = 0; - oscillators[osc].wtsize = 0; - oscillators[osc].control = 0; - oscillators[osc].vol = 0; - oscillators[osc].data = 0x80; - oscillators[osc].wavetblpointer = 0; - oscillators[osc].wavetblsize = 0; - oscillators[osc].resolution = 0; - oscillators[osc].accumulator = 0; - oscillators[osc].irqpend = 0; + elem.freq = 0; + elem.wtsize = 0; + elem.control = 0; + elem.vol = 0; + elem.data = 0x80; + elem.wavetblpointer = 0; + elem.wavetblsize = 0; + elem.resolution = 0; + elem.accumulator = 0; + elem.irqpend = 0; } oscsenabled = 1; |