Skip to content

Commit

Permalink
We have to recycle the last sample when between the last and next sample
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Jan 3, 2019
1 parent a770349 commit a756af4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/FAudio_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,15 @@ static void FAudio_INTERNAL_MixSource(FAudioSourceVoice *voice)
voice->src.curBufferOffsetDec += toResample * voice->src.resampleStep;
/* ... chop off any ints we got from the above increment */
voice->src.curBufferOffsetDec &= FIXED_FRACTION_MASK;

/* Dec >0? We need one frame from the past...
* FIXME: We can't go back to a prev buffer though?
*/
if ( voice->src.curBufferOffsetDec > 0 &&
voice->src.curBufferOffset > 0 )
{
voice->src.curBufferOffset -= 1;
}
}
else
{
Expand Down

0 comments on commit a756af4

Please # to comment.