diff options
| -rw-r--r-- | src/vox.c | 10 | 
1 files changed, 6 insertions, 4 deletions
| @@ -213,16 +213,18 @@ static ssize_t vox_fill(xas_vox *vox,      if (readlen == 0) {          vox_stop(vox); -    } else if (vox->gain != 1.0f) { +    } + +    readcount = readlen / vox->format.sample_size; + +    if (readcount > 0 && vox->gain != 1.0f) {          xas_audio_apply_gain(vox->format,                                 samples,                                 vox->gain,                                 0, -                               readlen); +                               readcount);      } -    readcount = readlen / vox->format.sample_size; -      xas_audio_zero(vox->format, samples, readcount, count-readcount);      return count; | 
 
    