]> sjero.net Git - linphone/blobdiff - coreapi/test_lsd.c
Aac-eld add missing header according to RFC3640 3.3.6
[linphone] / coreapi / test_lsd.c
index 64b5d8a785f1ab8cd12fb6c26d5143f32ec6533a..a4e78ea119076d7d3ca1a2b820eada0e4648f71c 100644 (file)
@@ -26,17 +26,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "linphonecore_utils.h"
 
+
 static void play_finished(LsdPlayer *p){
        const char *filename=(const char *)lsd_player_get_user_pointer (p);
        ms_message("Playing of %s is finished.",filename);
        if (!lsd_player_loop_enabled (p)){
-               linphone_sound_daemon_release_player (lsd_player_get_daemon(p));
+               linphone_sound_daemon_release_player (lsd_player_get_daemon(p),p);
        }
 }
 
 static void wait_a_bit(LinphoneCore *lc, int seconds){
-       time_t orig=time(NULL);
-       while(time(NULL)-orig<seconds){
+       time_t orig=ms_time(NULL);
+       while(ms_time(NULL)-orig<seconds){
                /* we need to call iterate to receive notifications */
                linphone_core_iterate(lc);
                ms_usleep (50000);
@@ -51,7 +52,7 @@ int main(int argc, char *argv[]){
 
        linphone_core_enable_logs(stdout);
        lc=linphone_core_new(&vtable,NULL,NULL,NULL);
-       lsd=linphone_sound_daemon_new (NULL);
+       lsd=linphone_sound_daemon_new (NULL,44100,1);
 
        linphone_core_use_sound_daemon(lc,lsd);
 
@@ -95,8 +96,9 @@ int main(int argc, char *argv[]){
                wait_a_bit(lc,10);
                linphone_core_terminate_call(lc,NULL);
        }
-       
-       linphone_core_destroy(lc);
+       linphone_core_use_sound_daemon(lc,NULL);
        linphone_sound_daemon_destroy(lsd);
+       linphone_core_destroy(lc);
+       
        return 0;
 }