ringtoneplayer: handle NULL ringtone for iOS too

parent ba58c9f0
......@@ -37,7 +37,14 @@ void linphone_ringtoneplayer_destroy(LinphoneRingtonePlayer* rp) {
}
int linphone_ringtoneplayer_start_with_cb(LinphoneRingtonePlayer* rp, MSSndCard* card, const char* ringtone, int loop_pause_ms, LinphoneRingtonePlayerFunc end_of_ringtone, void * user_data) {
return linphone_ringtoneplayer_ios_start_with_cb(rp, ringtone, loop_pause_ms, end_of_ringtone, user_data);
if (linphone_ringtoneplayer_is_started(rp)) {
ms_message("the local ringtone is already started");
return 2;
}
if (ringtone){
return linphone_ringtoneplayer_ios_start_with_cb(rp, ringtone, loop_pause_ms, end_of_ringtone, user_data);
}
return 3;
}
bool_t linphone_ringtoneplayer_is_started(LinphoneRingtonePlayer* rp) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment