Changeset 485

Show
Ignore:
Timestamp:
03/08/07 17:59:09 (1 year ago)
Author:
erikd
Message:

Prevent SIGFPE when ALSA fails to open correctly.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sweep/trunk/src/driver_alsa.c

    r483 r485  
    321321  int err; 
    322322 
    323   uframes = count / handle->driver_channels
     323  uframes = handle->driver_channels > 0 ? count / handle->driver_channels : 0
    324324 
    325325  err = snd_pcm_readi (pcm_handle, buf, uframes); 
     
    362362  /*printf ("sweep: alsa_write \n");*/ 
    363363 
    364   uframes = count / handle->driver_channels
     364  uframes = handle->driver_channels > 0 ? count / handle->driver_channels : 0
    365365  //printf ("sweep: alsa_write 1\n"); 
    366366