diff options
Diffstat (limited to 'src/devices/sound/disc_sys.hxx')
-rw-r--r-- | src/devices/sound/disc_sys.hxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/devices/sound/disc_sys.hxx b/src/devices/sound/disc_sys.hxx index 539942a707b..86cb356ec38 100644 --- a/src/devices/sound/disc_sys.hxx +++ b/src/devices/sound/disc_sys.hxx @@ -81,14 +81,13 @@ DISCRETE_START( dso_wavlog ) log_num = m_device->same_module_index(*this); sprintf(m_name, "%s_%d.csv", m_device->basetag(), log_num); - m_wavfile = wav_open(m_name, sample_rate(), active_inputs()/2); + m_wavfile = util::wav_open(m_name, sample_rate(), active_inputs()/2); } DISCRETE_STOP( dso_wavlog ) { /* close any wave files */ - if (m_wavfile) - wav_close(m_wavfile); + m_wavfile.reset(); } DISCRETE_STEP( dso_wavlog ) @@ -104,7 +103,7 @@ DISCRETE_STEP( dso_wavlog ) if (this->active_inputs() == 2) { /* DISCRETE_WAVLOG1 */ - wav_add_data_16(m_wavfile, &wave_data_l, 1); + util::wav_add_data_16(*m_wavfile, &wave_data_l, 1); } else { @@ -113,7 +112,7 @@ DISCRETE_STEP( dso_wavlog ) val = (val < -32768) ? -32768 : (val > 32767) ? 32767 : val; wave_data_r = (int16_t)val; - wav_add_data_16lr(m_wavfile, &wave_data_l, &wave_data_r, 1); + util::wav_add_data_16lr(*m_wavfile, &wave_data_l, &wave_data_r, 1); } } |