Previous 199869 Revisions Next

r31280 Monday 14th July, 2014 at 18:42:04 UTC by Couriersud
Adjusted maximum value suitable for streaming and removed some dead code.
[src/emu/sound]ay8910.c

trunk/src/emu/sound/ay8910.c
r31279r31280
521521
522522}
523523
524#ifdef UNUSED_FUNCTION
525INLINE void build_resistor_table(const ay8910_device::ay_ym_param *par, INT32 *tab, int zero_is_off)
526{
527   int j;
528
529   for (j=0; j < par->res_count; j++)
530   {
531      if (zero_is_off && j == 0)
532      {
533         tab[j] = 1e6;
534      }
535      else
536         tab[j] = par->res[j];
537   }
538}
539#endif
540
541524INLINE void build_mosfet_resistor_table(const ay8910_device::mosfet_param &par, const double rd, INT32 *tab)
542525{
543526    int j;
r31279r31280
551534        const double Vs = p2 - sqrt(p2 * p2 - Vg * Vg);
552535
553536        const double res = rd * ( Vd / Vs - 1.0);
554        /* FXIME: That's the biggest value we can stream on to netlist. Have to find a different
555         *        approach.
556         */
537        /* That's the biggest value we can stream on to netlist. */
557538
558        if (res > (1 << 21))
559            tab[j] = (1 << 21);
539        if (res > (1 << 28))
540            tab[j] = (1 << 28);
560541        else
561542            tab[j] = res;
562543        //printf("%d %f %10d\n", j, rd / (res + rd) * 5.0, tab[j]);
r31279r31280
815796      else
816797      {
817798         *(buf[0]++) = mix_3D();
818#if 0
819         *(buf[0]) = (  vol_enabled[0] * m_vol_table[m_Vol[0]]
820                     + vol_enabled[1] * m_vol_table[m_Vol[1]]
821                     + vol_enabled[2] * m_vol_table[m_Vol[2]]) / m_step;
822#endif
823799      }
824800      samples--;
825801   }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team