diff options
author | Aaron Giles <aaronsgiles@users.noreply.github.com> | 2020-10-20 07:59:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 10:59:34 -0400 |
commit | 89dbabd04d00674a0c33d750fb381aba1d8cdf16 (patch) | |
tree | d040a7ed9a39f098afd39b52f58e06169a60adc0 /src/devices/sound | |
parent | b6d87c5b2384b19fec058d2a67908c89fe5f8b73 (diff) |
volt_reg: Remove uses that are not needed anymore with the recent (#7367)
DAC changes. Which is all of them. Remove the device as well.
Diffstat (limited to 'src/devices/sound')
-rw-r--r-- | src/devices/sound/ad1848.cpp | 6 | ||||
-rw-r--r-- | src/devices/sound/dac.h | 6 | ||||
-rw-r--r-- | src/devices/sound/volt_reg.cpp | 36 | ||||
-rw-r--r-- | src/devices/sound/volt_reg.h | 40 |
4 files changed, 2 insertions, 86 deletions
diff --git a/src/devices/sound/ad1848.cpp b/src/devices/sound/ad1848.cpp index 368025c83cb..b9fec7e6125 100644 --- a/src/devices/sound/ad1848.cpp +++ b/src/devices/sound/ad1848.cpp @@ -7,7 +7,6 @@ #include "emu.h" #include "sound/ad1848.h" -#include "sound/volt_reg.h" #include "speaker.h" @@ -28,11 +27,6 @@ void ad1848_device::device_add_mconfig(machine_config &config) SPEAKER(config, "rspeaker").front_right(); DAC_16BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC DAC_16BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC - voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0)); - vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); - vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT); - vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); - vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT); } diff --git a/src/devices/sound/dac.h b/src/devices/sound/dac.h index 823df5ea124..ee6f5df0fe9 100644 --- a/src/devices/sound/dac.h +++ b/src/devices/sound/dac.h @@ -27,9 +27,6 @@ #define DAC_INPUT_RANGE_HI (0) #define DAC_INPUT_RANGE_LO (1) -#define DAC_VREF_POS_INPUT (DAC_INPUT_RANGE_HI) -#define DAC_VREF_NEG_INPUT (DAC_INPUT_RANGE_LO) - //************************************************************************** @@ -102,7 +99,8 @@ protected: } public: - // configuration + // configuration: default output range is -1..1 for all cases except + // for 1-bit DACs, which default to 0..1 dac_device_base &set_output_range(stream_buffer::sample_t range_min, stream_buffer::sample_t range_max) { m_range_min = range_min; diff --git a/src/devices/sound/volt_reg.cpp b/src/devices/sound/volt_reg.cpp deleted file mode 100644 index 14ccdfaab16..00000000000 --- a/src/devices/sound/volt_reg.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:smf -/*************************************************************************** - - volt_reg.cpp - - Direct current. - - TODO: - - If we continue having this device in MAME, add support for default voltage other - than (currently hardcoded) 5.0 - -***************************************************************************/ - -#include "emu.h" -#include "volt_reg.h" - -DEFINE_DEVICE_TYPE(VOLTAGE_REGULATOR, voltage_regulator_device, "volt_reg", "Voltage Regulator") - -voltage_regulator_device::voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, VOLTAGE_REGULATOR, tag, owner, clock), - device_sound_interface(mconfig, *this), - m_stream(nullptr), - m_output(1.0) -{ -} - -void voltage_regulator_device::device_start() -{ - m_stream = stream_alloc(0, 1, SAMPLE_RATE_MINIMUM); -} - -void voltage_regulator_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) -{ - outputs[0].fill(m_output); -} diff --git a/src/devices/sound/volt_reg.h b/src/devices/sound/volt_reg.h deleted file mode 100644 index c672878fd4b..00000000000 --- a/src/devices/sound/volt_reg.h +++ /dev/null @@ -1,40 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:smf -/*************************************************************************** - - volt_reg.h - - Voltage Regulator - -***************************************************************************/ - -#ifndef MAME_SOUND_VOLT_REG_H -#define MAME_SOUND_VOLT_REG_H - -#pragma once - - -class voltage_regulator_device : public device_t, public device_sound_interface -{ -public: - voltage_regulator_device &set_output(double analogue_dc) { m_output = analogue_dc / 5.0f; return *this; } - - voltage_regulator_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - - virtual bool issound() override { return false; } - -protected: - // device-level overrides - virtual void device_start() override; - - // sound stream update overrides - virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override; - -private: - sound_stream* m_stream; - stream_buffer::sample_t m_output; -}; - -DECLARE_DEVICE_TYPE(VOLTAGE_REGULATOR, voltage_regulator_device) - -#endif // MAME_SOUND_VOLT_REG_H |