[GnomeMeeting-list] speex



I had a problem to compile openh323 with the new speex. I made a chance
in: speexcodec.cxx. I' m not shure if these mods are in the right way.

Regars
Franz

fuder queen:~/software/openh323/src> diff speexcodec.cxx
speexcodec.cxx.orginal
556c556
<   short int intData[SAMPLES_PER_FRAME];
---
>   float floatData[SAMPLES_PER_FRAME];
559c559
<     intData[i] = sampleBuffer[i];
---
>     floatData[i] = sampleBuffer[i];
563c563
<   speex_encode(coder_state, intData, bits);
---
>   speex_encode(coder_state, floatData, bits);
573c573
<   short int intData[SAMPLES_PER_FRAME];
---
>   float floatData[SAMPLES_PER_FRAME];
577c577
<   speex_decode(coder_state, bits, intData);
---
>   speex_decode(coder_state, bits, floatData);
581,583c581,588
<   for (i = 0; i < SAMPLES_PER_FRAME; i++)
<     sampleBuffer[i] = intData[i];
<
---
>   for (i = 0; i < SAMPLES_PER_FRAME; i++) {
>     float sample = floatData[i];
>     if (sample < MinSampleValue)
>       sample = MinSampleValue;
>     else if (sample > MaxSampleValue)
>       sample = MaxSampleValue;
>     sampleBuffer[i] = (short)sample;
>   }




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]