equal
deleted
inserted
replaced
207 int i; |
207 int i; |
208 |
208 |
209 SDL_assert((dest_samples * framelen) <= outbuflen); |
209 SDL_assert((dest_samples * framelen) <= outbuflen); |
210 SDL_assert((inbuflen % framelen) == 0); |
210 SDL_assert((inbuflen % framelen) == 0); |
211 |
211 |
212 while(dst < target) { |
212 while (dst < target) { |
213 const int pos = ((int)idx) * chans; |
213 const int pos = ((int)idx) * chans; |
214 const float *src = &inbuf[(pos >= finalpos) ? finalpos : pos]; |
214 const float *src = &inbuf[pos]; |
|
215 SDL_assert(pos <= finalpos); |
215 for (i = 0; i < chans; i++) { |
216 for (i = 0; i < chans; i++) { |
216 const float val = *(src++); |
217 const float val = *(src++); |
217 *(dst++) = (val + last_sample[i]) * 0.5f; |
218 *(dst++) = (val + last_sample[i]) * 0.5f; |
218 last_sample[i] = val; |
219 last_sample[i] = val; |
219 } |
220 } |