Mercurial > SDL_sound_CoreAudio
comparison decoders/speex.c @ 454:6bd7ca7d218b
Took out a C++-style comment.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 13 Sep 2003 20:46:09 +0000 |
parents | 573eaefef003 |
children | 1841bdcf2122 50bb9a6cebfe |
comparison
equal
deleted
inserted
replaced
453:b9856ba6fb4e | 454:6bd7ca7d218b |
---|---|
318 speex->decode_pos += maxoutput; | 318 speex->decode_pos += maxoutput; |
319 cpypos += maxoutput; | 319 cpypos += maxoutput; |
320 | 320 |
321 for (max = dst + maxoutput; dst < max; dst++, src++) | 321 for (max = dst + maxoutput; dst < max; dst++, src++) |
322 { | 322 { |
323 /* !!! FIXME: This screams for vectorization. */ | |
323 register float f = *src; | 324 register float f = *src; |
324 if (f > 32000.0f) /* eh, speexdec.c clamps like this, too. */ | 325 if (f > 32000.0f) /* eh, speexdec.c clamps like this, too. */ |
325 f = 32000.0f; | 326 f = 32000.0f; |
326 else if (f < -32000.0f) | 327 else if (f < -32000.0f) |
327 f = -32000.0f; | 328 f = -32000.0f; |
328 *dst = //(Sint16) round(f); | 329 *dst = (Sint16) (0.5f + f); |
329 // (Sint16) floor(.5f+f); | |
330 (Sint16) 0.5f+f; | |
331 } /* for */ | 330 } /* for */ |
332 | 331 |
333 return(cpypos << 1); | 332 return(cpypos << 1); |
334 } /* copy_from_decoded */ | 333 } /* copy_from_decoded */ |
335 | 334 |