[Speex-dev] Introduction and patch
Jean-Marc Valin
jean-marc.valin at usherbrooke.ca
Sun Mar 11 07:31:33 PDT 2007
OK, most of these are now fixed in svn (in some cases using a different
fix than the patch).
Cheers,
Jean-Marc
Dan Everton a écrit :
> Hi,
>
> I'm one of the people working on the Rockbox project
> (http://www.rockbox.org) which is an open source alternative firmware
> for a range Digital Audio Players. Recently we integrated support for
> the Speex codec using libspeex and seems to work well. If you could add
> Rockbox to your list of software that supports Speex, that'd be great.
>
> So that's the introduction done. Now for the patch. Integrating libspeex
> in to Rockbox generated some warnings while compiling, so the attached
> patch should include fixes for those warnings. Hope it's useful.
>
> Cheers,
> Dan
>
>
> ------------------------------------------------------------------------
>
> diff -bu ../../../speex/libspeex/fftwrap.c libspeex/fftwrap.c
> --- ../../../speex/libspeex/fftwrap.c 2007-03-08 18:46:57.000000000 +1000
> +++ libspeex/fftwrap.c 2007-03-08 20:45:23.000000000 +1000
> @@ -165,7 +165,6 @@
>
> void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
> {
> - int i;
> int shift;
> struct kiss_config *t = (struct kiss_config *)table;
> shift = maximize_range(in, in, 32000, t->N);
> @@ -188,9 +187,10 @@
> }
> #endif
>
> +void kiss_fftri2(kiss_fftr_cfg cfg,const kiss_fft_scalar *freqdata,kiss_fft_scalar *timedata);
> +
> void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
> {
> - int i;
> struct kiss_config *t = (struct kiss_config *)table;
> kiss_fftri2(t->backward, in, out);
> }
> diff -bu ../../../speex/libspeex/jitter.c libspeex/jitter.c
> --- ../../../speex/libspeex/jitter.c 2007-03-08 18:46:57.000000000 +1000
> +++ libspeex/jitter.c 2007-03-08 20:43:01.000000000 +1000
> @@ -188,7 +188,7 @@
>
> /* Copy packet in buffer */
> jitter->buf[i]=(char*)speex_alloc(packet->len);
> - for (j=0;j<packet->len;j++)
> + for (j=0;((unsigned)j)<packet->len;j++)
> jitter->buf[i][j]=packet->data[j];
> jitter->timestamp[i]=packet->timestamp;
> jitter->span[i]=packet->span;
> @@ -251,7 +251,7 @@
> float ontime_ratio_long;
> float early_ratio_short;
> float early_ratio_long;
> - int chunk_size;
> + int chunk_size = 0;
> int incomplete = 0;
>
> if (jitter->interp_requested)
> @@ -369,7 +369,7 @@
> /* Check for potential overflow */
> packet->len = jitter->len[i];
> /* Copy packet */
> - for (j=0;j<packet->len;j++)
> + for (j=0;((unsigned)j)<packet->len;j++)
> packet->data[j] = jitter->buf[i][j];
> /* Remove packet */
> speex_free(jitter->buf[i]);
> @@ -438,7 +438,7 @@
> /* Let the jitter buffer know it's the right time to adjust the buffering delay to the network conditions */
> int jitter_buffer_update_delay(JitterBuffer *jitter, JitterBufferPacket *packet, spx_uint32_t *start_offset)
> {
> - int i, j;
> + int i;
> float late_ratio_short;
> float late_ratio_long;
> float ontime_ratio_short;
> diff -bu ../../../speex/libspeex/kiss_fft.c libspeex/kiss_fft.c
> --- ../../../speex/libspeex/kiss_fft.c 2007-02-09 20:12:29.000000000 +1000
> +++ libspeex/kiss_fft.c 2007-03-08 20:33:21.000000000 +1000
> @@ -85,7 +85,7 @@
> tw3 = tw2 = tw1 = st->twiddles;
>
> if (!st->inverse) {
> - int i;
> + unsigned int i;
> kiss_fft_cpx *x=Fout;
> for (i=0;i<4*m;i++)
> {
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
More information about the Speex-dev
mailing list