[AD] div-by-zero.. wdsndmix.c

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


in  /allegro419/src/win/wdsndmix.c

these two variables
  digidsbufsize
  bufdivs

do alot of division, and i do not see too much checking for possible zero values.


this snippet from  /allegro419/src/win/wdsndmix.c
in   digi_dsoundmix_init(int input, int voices)
looks a bit like a possible div by zero... the bufdivs var might calc to zero, then get used in a divide a few lines later.


---- snip --------

  digidsbufpos = 0;
   bufdivs = digidsbufsize/1024;

--snip --

   if (_mixer_init((digidsbufsize / (_bits /8)) / bufdivs, _freq,
_stereo, ((_bits == 16) ? 1 : 0), &digi_driver->voices) != 0) {
      _TRACE("Can't init software mixer\n");
      return -1;
   }

--- end snip ------





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/