mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-02 03:09:23 +00:00
Make the FilePlayer to choose the default sound card for Android
This commit is contained in:
parent
f89751515f
commit
95d4375ac8
1 changed files with 12 additions and 1 deletions
|
|
@ -5288,7 +5288,18 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphonePlayer_close(JNIEnv *env,
|
|||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_org_linphone_core_LinphoneCore_createPlayer(JNIEnv *env, jobject jobj, jlong ptr) {
|
||||
return (jlong)linphone_core_create_file_player((LinphoneCore *)ptr, NULL, NULL);
|
||||
MSSndCard *snd_card = ms_snd_card_manager_get_default_playback_card(ms_snd_card_manager_get());
|
||||
if(snd_card == NULL) {
|
||||
ms_error("No default playback sound card found");
|
||||
return 0;
|
||||
}
|
||||
LinphonePlayer *player = linphone_core_create_file_player((LinphoneCore *)ptr, snd_card, NULL);
|
||||
if(player == NULL) {
|
||||
ms_error("Fails to create a player");
|
||||
return 0;
|
||||
} else {
|
||||
return (jlong)player;
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCore_destroyPlayer(JNIEnv *env, jobject jobj, jlong playerPtr) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue