{
memset (lc, 0, sizeof (LinphoneCore));
lc->data=userdata;
-
+ lc->ringstream_autorelease=TRUE;
+
memcpy(&lc->vtable,vtable,sizeof(LinphoneCoreVTable));
linphone_core_set_state(lc,LinphoneGlobalStartup,"Starting up");
lc_callback_obj_invoke(&lc->preview_finished_cb,lc);
}
- if (lc->ringstream && lc->dmfs_playing_start_time!=0
+ if (lc->ringstream && lc->ringstream_autorelease && lc->dmfs_playing_start_time!=0
&& (curtime-lc->dmfs_playing_start_time)>5){
ring_stop(lc->ringstream);
lc->ringstream=NULL;
bool_t linphone_core_keep_alive_enabled(LinphoneCore* lc) {
return sal_get_keepalive_period(lc->sal) > 0;
}
+
+void linphone_core_start_dtmf_stream(LinphoneCore* lc) {
+ get_dtmf_gen(lc); /*make sure ring stream is started*/
+ lc->ringstream_autorelease=FALSE; /*disable autorelease mode*/
+}
+
+void linphone_core_stop_dtmf_stream(LinphoneCore* lc) {
+ if (lc->ringstream) ring_stop(lc->ringstream);
+ lc->ringstream=NULL;
+}
+
+
* Start an echo calibration of the sound devices, in order to find adequate settings for the echo canceller automatically.
**/
int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibrationCallback cb, void *cb_data);
+#if TARGET_OS_IPHONE
+/**
+ * IOS special function to warm up dtmf feeback stream. #linphone_core_stop_dtmf_stream must be called before entering BG mode
+ */
+void linphone_core_start_dtmf_stream(const LinphoneCore* lc);
+/**
+ * IOS special function to stop dtmf feed back function. Must be called before entering BG mode
+ */
+void linphone_core_stop_dtmf_stream(const LinphoneCore* lc);
+#endif
+
+
#ifdef __cplusplus
}
#endif
bool_t auto_net_state_mon;
bool_t network_reachable;
bool_t use_preview_window;
+ bool_t ringstream_autorelease;
};
bool_t linphone_core_can_we_add_call(LinphoneCore *lc);