Changeset 2691

Show
Ignore:
Timestamp:
08/31/99 18:45:48 (15 years ago)
Author:
ucaccsp
Message:

Hopefully fix mixer bug where we tried to write too many zeros into the
buffer, and overwrote the tail pointer. Used to manifest itself as an
assertion failure in the mix_verify() function called from line 250.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/mix.c

    r2587 r2691  
    239239                zeros = delta.ticks * ms->channels * ms->rate / ts_get_freq(delta); 
    240240                if (zeros > ms->buf_len) { 
    241                         debug_msg("Wanted to write to many zeros (%d)\n", zeros); 
    242                         zeros = ms->buf_len; /* Don't overwrite buffer */ 
     241                        debug_msg("Wanted to write too many zeros (%d into buffer of size %d)\n", zeros, ms->buf_len); 
     242                        zeros = ms->buf_len - ms->dist; /* Don't overwrite buffer */ 
    243243                } 
    244244                mix_verify(ms);