allow playing audio file during hold on

This commit is contained in:
Simon Morlat 2010-08-25 14:26:45 +02:00
parent 370d0ff8b0
commit 1e15e24d8d
3 changed files with 21 additions and 3 deletions

View file

@ -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

View file

@ -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,

View file

@ -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){