Ejemplo n.º 1
0
        // constructor
        public dac_device_base(machine_config mconfig, device_type type, string tag, device_t owner, uint32_t clock, u8 bits, dac_mapper_callback mapper, stream_buffer_sample_t gain)
            : base(mconfig, type, tag, owner, clock)
        {
            m_class_interfaces.Add(new device_sound_interface_dac_device_base(mconfig, this));  //device_sound_interface(mconfig, *this);
            m_disound = GetClassInterface <device_sound_interface_dac_device_base>();


            m_stream    = null;
            m_curval    = 0;
            m_value_map = new std.vector <stream_buffer_sample_t>(1 << bits);
            m_bits      = bits;
            m_mapper    = mapper;
            m_gain      = gain;
            m_range_min = (bits == 1) ? (stream_buffer_sample_t)0.0 : (stream_buffer_sample_t)(-1.0);
            m_range_max = (stream_buffer_sample_t)1.0;
        }
Ejemplo n.º 2
0
 protected dac_word_device_base(machine_config mconfig, device_type type, string tag, device_t owner, u32 clock, u8 bits, dac_mapper_callback mapper, stream_buffer_sample_t gain)
     : base(mconfig, type, tag, owner, clock, bits, mapper, gain)
 {
 }