Commit cad549db authored by Sandrine Avakian's avatar Sandrine Avakian

G722 corrections made by F. Grisez (merge pbm).

parent 085f64d4
......@@ -191,7 +191,11 @@ if(ENABLE_ZRTP)
endif()
if(ENABLE_DTLS AND ENABLE_SRTP) # DTLS requires SRTP
if(NOT POLARSSL_FOUND OR NOT HAVE_SSL_GET_DTLS_SRTP_PROTECTION_PROFILE)
message(WARNING "Could not find polarssl library with DTLS support, mediastreamer2 will be compiled without DTLS support.")
if (NOT POLARSSL_FOUND)
message(WARNING "Could not find polarssl library required by DTLS, mediastreamer2 will be compiled without DTLS support.")
else()
message(WARNING "Polarssl library was found but misses HAVE_SSL_GET_DTLS_SRTP_PROTECTION_PROFILE required by DTLS, mediastreamer2 will be compiled without DTLS support.")
endif()
set(ENABLE_DTLS OFF CACHE BOOL "Build mediastreamer2 with DTLS support." FORCE)
endif()
endif()
......
......@@ -277,7 +277,7 @@ SoundDeviceDescription * sound_device_description_get(void){
if (exact_match && (d->flags & DEVICE_HAS_BUILTIN_AEC_CRAPPY)){
ms_warning("This device declares a builtin AEC but according to internal tables it is known to be misfunctionning, so trusting tables.");
}else{
d->flags=DEVICE_HAS_BUILTIN_AEC;
d->flags |= DEVICE_HAS_BUILTIN_AEC;
d->delay=0;
}
}
......
......@@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "g722.h"
#endif
#define ENABLE_PCM_RESCALING 0
#define ENABLE_PCM_RESCALING 1
struct EncState {
g722_encode_state_t *state;
......@@ -67,7 +67,7 @@ static void scale_down(int16_t *samples, int count){
#if ENABLE_PCM_RESCALING
int i;
for (i=0;i<count;++i)
samples[i]=samples[i]>>1;
samples[i]=samples[i]>>2;
#endif
}
......@@ -75,12 +75,12 @@ static void scale_up(int16_t *samples, int count){
#if ENABLE_PCM_RESCALING
int i;
for (i=0;i<count;++i) {
if (samples[i]>INT16_MAX/2) {
if (samples[i]>INT16_MAX/4) {
samples[i] = INT16_MAX;
} else if (samples[i]<INT16_MIN/2) {
} else if (samples[i]<INT16_MIN/4) {
samples[i] = INT16_MIN;
} else {
samples[i]=samples[i]<<1;
samples[i]=samples[i]<<2;
}
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment