add mute capability

update windows compilation notes.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@645 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
smorlat 2009-09-11 10:06:48 +00:00
parent e78fc46b98
commit 7904f6a229
6 changed files with 22 additions and 11 deletions

View file

@ -14,7 +14,6 @@ Download from mingw download page (http://www.mingw.org, click download):
- MSYS automake-1.11
- MSYS autoconf-2.63
- MSYS libtool>=2.2.7
- GNU binutils-2.19
- MSYS libcrypt*-bin
- MSYS perl
===> Uncompress all these packages in /
@ -28,12 +27,13 @@ Download from mingw download page (http://www.mingw.org, click download):
- mpfr*-dll
- w32api-dev
- mingwrt-dev and mingwrt-dll (mingw run time)
- gnu binutils 2.19
===> Uncompress all these packages in /mingw
note: lzma files can be uncompressed using tar --lzma -xvf <file>
* Move out libstdc++.la in order to workaround a gcc-4.4.0 bug (or packaging bug):
mv /mingw/lib/gcc/4.4.0/libstdc++.la /mingw/lib/gcc/4.4.0/libstdc++.la.bak
mv /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la.bak
* Download intltool (quicklink:
http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip
@ -52,7 +52,8 @@ note: lzma files can be uncompressed using tar --lzma -xvf <file>
http://download.savannah.gnu.org/releases-noredirect/linphone/misc/)
uncompress in /
* Download and install Inno Setup Compiler in its default path (required only if you run 'make setup.exe').
* HACK: move out /lib/libintl.la : it confuses libtool
mv /lib/libintl.la /lib/libintl.la.bak
Get Linphone source code
************************

View file

@ -1509,15 +1509,11 @@ void linphone_core_init_media_streams(LinphoneCore *lc){
lc->audiostream=audio_stream_new(linphone_core_get_audio_port(lc),linphone_core_ipv6_enabled(lc));
if (linphone_core_echo_limiter_enabled(lc)){
const char *type=lp_config_get_string(lc->config,"sound","el_type","mic");
float gain=lp_config_get_float(lc->config,"sound","mic_gain",-1);
if (strcasecmp(type,"mic")==0)
audio_stream_enable_echo_limiter(lc->audiostream,ELControlMic);
else if (strcasecmp(type,"speaker")==0)
audio_stream_enable_echo_limiter(lc->audiostream,ELControlSpeaker);
if (gain!=-1){
audio_stream_enable_gain_control(lc->audiostream,TRUE);
}
audio_stream_enable_gain_control(lc->audiostream,TRUE);
}
if (linphone_core_echo_cancelation_enabled(lc)){
int len,delay,framesize;
@ -2074,6 +2070,13 @@ bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc){
return lc->sound_conf.ea;
}
void linphone_core_mute_mic(LinphoneCore *lc, bool_t val){
if (lc->audiostream!=NULL){
audio_stream_set_mic_gain(lc->audiostream,
(val==TRUE) ? 0 : 1.0);
}
}
void linphone_core_enable_agc(LinphoneCore *lc, bool_t val){
lc->sound_conf.agc=val;
}

View file

@ -726,6 +726,8 @@ bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc);
void linphone_core_enable_agc(LinphoneCore *lc, bool_t val);
bool_t linphone_core_agc_enabled(const LinphoneCore *lc);
void linphone_core_mute_mic(LinphoneCore *lc, bool_t muted);
void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away,const char *contact,LinphoneOnlineStatus os);
LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *lc);

View file

@ -769,7 +769,7 @@ int linphone_core_get_local_ip_for(const char *dest, char *result){
}
sock=socket(res->ai_family,SOCK_DGRAM,0);
tmp=1;
err=setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,&tmp,sizeof(int));
err=setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(SOCKET_OPTION_VALUE)&tmp,sizeof(int));
if (err<0){
ms_warning("Error in setsockopt: %s",strerror(errno));
}

View file

@ -109,3 +109,8 @@ void linphone_gtk_in_call_view_terminate(const char *error_msg){
}
g_timeout_add_seconds(2,(GSourceFunc)in_call_view_terminated,NULL);
}
void linphone_gtk_incall_mute_toggled(GtkToggleButton *button){
linphone_core_mute_mic(linphone_gtk_get_core(),
gtk_toggle_button_get_active(button));
}

View file

@ -21,7 +21,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = @SHELL@
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@ -56,7 +56,7 @@ ALL_LINGUAS = @ALL_LINGUAS@
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep ^$$lang$$`"; then printf "$$lang "; fi; done; fi)
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)