Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
0b0bb804
Commit
0b0bb804
authored
Aug 31, 2020
by
DanmeiChen
Browse files
notify ms2 to update resampler to fix lost of sound when audio route changed
parent
6f64132d
Changes
5
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
0b0bb804
...
...
@@ -17,6 +17,7 @@ This changelog file was started on October 2019. Previous changes were more or l
-
Handling push notifications, activity monitor and Core iterate automatically in Core for Android.
-
Auto acquire and release of audio focus for Android.
-
Added API to play user's ringtone instead of default ringtone for Android.
-
New method linphone_core_audio_route_changed(), to fix audio issues when switching audio to some low sample rate Bluetooth devices.
### Changed
-
Improved Android network manager.
...
...
coreapi/linphonecore.c
View file @
0b0bb804
...
...
@@ -7033,8 +7033,12 @@ void linphone_core_enable_callkit (LinphoneCore *lc, bool_t enabled) {
linphone_config_set_int
(
lc
->
config
,
"app"
,
"use_callkit"
,
(
int
)
enabled
);
}
bool_t
linphone_core_callkit_enabled
(
const
LinphoneCore
*
lc
)
{
return
(
bool_t
)
linphone_config_get_int
(
lc
->
config
,
"app"
,
"use_callkit"
,
0
);
void
linphone_core_audio_route_changed
(
LinphoneCore
*
core
)
{
L_GET_CPP_PTR_FROM_C_OBJECT
(
core
)
->
soundcardAudioRouteChanged
();
}
bool_t
linphone_core_callkit_enabled
(
const
LinphoneCore
*
core
)
{
return
(
bool_t
)
linphone_config_get_int
(
core
->
config
,
"app"
,
"use_callkit"
,
0
);
}
void
linphone_core_set_remote_ringback_tone
(
LinphoneCore
*
lc
,
const
char
*
file
){
...
...
include/linphone/core_utils.h
View file @
0b0bb804
...
...
@@ -146,13 +146,20 @@ LINPHONE_PUBLIC void linphone_core_activate_audio_session(LinphoneCore* core, bo
*/
LINPHONE_PUBLIC
void
linphone_core_enable_callkit
(
LinphoneCore
*
core
,
bool_t
enabled
);
/**
* Special function to indicate if the audio route is changed. Must be called in the callback of AVAudioSessionRouteChangeNotification.
* @param core The #LinphoneCore object. @notnil
* @ingroup IOS
*/
LINPHONE_PUBLIC
void
linphone_core_audio_route_changed
(
LinphoneCore
*
core
);
/**
* Special function to check if the callkit is enabled, False by default.
* @param core The #LinphoneCore object. @notnil
* @return TRUE if callkit is enabled, FALSE otherwise.
* @ingroup IOS
*/
LINPHONE_PUBLIC
bool_t
linphone_core_callkit_enabled
(
const
LinphoneCore
*
l
c
);
LINPHONE_PUBLIC
bool_t
linphone_core_callkit_enabled
(
const
LinphoneCore
*
c
ore
);
typedef
bool_t
(
*
LinphoneCoreIterateHook
)(
void
*
data
);
...
...
src/core/core-call.cpp
View file @
0b0bb804
...
...
@@ -265,6 +265,13 @@ void Core::soundcardEnableCallkit (bool enabled) {
}
}
void
Core
::
soundcardAudioRouteChanged
()
{
MSSndCard
*
card
=
getCCore
()
->
sound_conf
.
capt_sndcard
;
if
(
card
)
{
ms_snd_card_notify_audio_route_changed
(
card
);
}
}
LinphoneStatus
Core
::
terminateAllCalls
()
{
L_D
();
auto
calls
=
d
->
calls
;
...
...
src/core/core.h
View file @
0b0bb804
...
...
@@ -127,6 +127,7 @@ public:
void
soundcardHintCheck
();
void
soundcardActivateAudioSession
(
bool
active
);
void
soundcardEnableCallkit
(
bool
enabled
);
void
soundcardAudioRouteChanged
();
LinphoneStatus
terminateAllCalls
();
// ---------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment