diff options
author | hap <happppp@users.noreply.github.com> | 2016-01-21 22:06:28 +0100 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2016-01-21 22:06:48 +0100 |
commit | 8acfdd7ee0e15f512daf482a920d0b13ada8b4e9 (patch) | |
tree | d996d52807ad297d9c8ab1766889936a1629dbd1 /src/devices/sound | |
parent | 6965f6ddb429b2e00bd3005e12665038b79f7ec3 (diff) |
beep_device: removed set_volume
Diffstat (limited to 'src/devices/sound')
-rw-r--r-- | src/devices/sound/beep.cpp | 22 | ||||
-rw-r--r-- | src/devices/sound/beep.h | 5 |
2 files changed, 6 insertions, 21 deletions
diff --git a/src/devices/sound/beep.cpp b/src/devices/sound/beep.cpp index d7dbd1dc036..a6dd5226453 100644 --- a/src/devices/sound/beep.cpp +++ b/src/devices/sound/beep.cpp @@ -107,12 +107,12 @@ void beep_device::sound_stream_update(sound_stream &stream, stream_sample_t **in WRITE_LINE_MEMBER(beep_device::set_state) { /* only update if new state is not the same as old state */ - state = (state) ? 1 : 0; - if (m_enable == state) + int on = (state) ? 1 : 0; + if (m_enable == on) return; m_stream->update(); - m_enable = state; + m_enable = on; /* restart wave from beginning */ m_incr = 0; @@ -120,12 +120,11 @@ WRITE_LINE_MEMBER(beep_device::set_state) } - //------------------------------------------------- // setting new frequency starts from beginning //------------------------------------------------- -void beep_device::set_frequency(int frequency) +void beep_device::set_clock(UINT32 frequency) { if (m_frequency == frequency) return; @@ -135,16 +134,3 @@ void beep_device::set_frequency(int frequency) m_signal = 0x07fff; m_incr = 0; } - - - -//------------------------------------------------- -// change a channel volume -//------------------------------------------------- - -void beep_device::set_volume(int volume) -{ - m_stream->update(); - volume = 100 * volume / 7; - set_output_gain(0, volume); -} diff --git a/src/devices/sound/beep.h b/src/devices/sound/beep.h index 7a08f0f4563..0970e6f4a93 100644 --- a/src/devices/sound/beep.h +++ b/src/devices/sound/beep.h @@ -26,9 +26,8 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; public: - DECLARE_WRITE_LINE_MEMBER(set_state); // enable(1) - void set_frequency(int frequency); - void set_volume(int volume); + DECLARE_WRITE_LINE_MEMBER(set_state); // enable/disable sound output + void set_clock(UINT32 frequency); // output frequency private: sound_stream *m_stream; /* stream number */ |