From 1e15e24d8db0e3bca1ebf70d3fb291c61c16110e Mon Sep 17 00:00:00 2001 From: Simon Morlat <simon.morlat@linphone.org> Date: Wed, 25 Aug 2010 14:26:45 +0200 Subject: [PATCH] allow playing audio file during hold on --- configure.in | 2 +- coreapi/linphonecall.c | 6 ++++-- coreapi/linphonecore.c | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 6495ab0a62..cda24af910 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([linphone],[3.3.99],[linphone-developers@nongnu.org]) +AC_INIT([linphone],[3.3.99.1],[linphone-developers@nongnu.org]) AC_CANONICAL_SYSTEM dnl Source packaging numbers diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 871d00e570..0899231260 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -609,8 +609,10 @@ void linphone_call_start_media_streams(LinphoneCall *call){ recfile=NULL; } /*if playfile are supplied don't use soundcards*/ - if (playfile) captcard=NULL; - if (recfile) playcard=NULL; + if (lc->use_files) { + captcard=NULL; + playcard=NULL; + } audio_stream_start_full( call->audiostream, call->audio_profile, diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 82d77c6ab1..cede342dc6 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3238,10 +3238,19 @@ MSVideoSize linphone_core_get_preferred_video_size(LinphoneCore *lc){ return lc->video_conf.vsize; } +/** + * Ask the core to stream audio from and to files, instead of using the soundcard. +**/ void linphone_core_use_files(LinphoneCore *lc, bool_t yesno){ lc->use_files=yesno; } +/** + * Sets a wav file to be played when putting somebody on hold, + * or when files are used instead of soundcards (see linphone_core_use_files()). + * + * The file must be a 16 bit linear wav file. +**/ void linphone_core_set_play_file(LinphoneCore *lc, const char *file){ LinphoneCall *call=linphone_core_get_current_call(lc); if (lc->play_file!=NULL){ @@ -3255,6 +3264,13 @@ void linphone_core_set_play_file(LinphoneCore *lc, const char *file){ } } + +/** + * Sets a wav file where incoming stream is to be recorded, + * when files are used instead of soundcards (see linphone_core_use_files()). + * + * The file must be a 16 bit linear wav file. +**/ void linphone_core_set_record_file(LinphoneCore *lc, const char *file){ LinphoneCall *call=linphone_core_get_current_call(lc); if (lc->rec_file!=NULL){ -- GitLab