mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 00:29:21 +00:00
Fix the soundcard hint so that it trigger only when _all_ calls are paused or pausing (instead of just one call suffice). Also increase the test delay.
This commit is contained in:
parent
3e56dcac16
commit
697a6d4a89
2 changed files with 6 additions and 6 deletions
|
|
@ -6438,20 +6438,20 @@ static void notify_soundcard_usage(LinphoneCore *lc, bool_t used){
|
|||
void linphone_core_soundcard_hint_check( LinphoneCore* lc){
|
||||
MSList* the_calls = lc->calls;
|
||||
LinphoneCall* call = NULL;
|
||||
bool_t remaining_paused = FALSE;
|
||||
bool_t dont_need_sound = TRUE;
|
||||
|
||||
/* check if the remaining calls are paused */
|
||||
while( the_calls ){
|
||||
call = the_calls->data;
|
||||
if( call->state == LinphoneCallPausing || call->state == LinphoneCallPaused ){
|
||||
remaining_paused = TRUE;
|
||||
if( call->state != LinphoneCallPausing && call->state != LinphoneCallPaused ){
|
||||
dont_need_sound = FALSE;
|
||||
break;
|
||||
}
|
||||
the_calls = the_calls->next;
|
||||
}
|
||||
|
||||
/* if no more calls or all calls are paused, we can free the soundcard */
|
||||
if ( (lc->calls==NULL || remaining_paused) && !lc->use_files){
|
||||
if ( (lc->calls==NULL || dont_need_sound) && !lc->use_files){
|
||||
ms_message("Notifying soundcard that we don't need it anymore for calls.");
|
||||
notify_soundcard_usage(lc,FALSE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2581,8 +2581,8 @@ static void call_transfer_existing_call_outgoing_call(void) {
|
|||
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallRefered,1,2000));
|
||||
|
||||
/*pauline pausing marie*/
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallPausing,1,2000));
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallPaused,1,2000));
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallPausing,1,4000));
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallPaused,1,4000));
|
||||
/*pauline calling laure*/
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallOutgoingProgress,1,2000));
|
||||
CU_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneTransferCallOutgoingInit,1,2000));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue