/* this is called instead of sys_main() to start things */ void libpd_init(void) { signal(SIGFPE, SIG_IGN); libpd_start_message(32); // allocate array for message assembly //printf ( "%p\n", &libpd_printhook ); sys_printhook = (t_printhook) libpd_printhook; sys_soundin = NULL; sys_soundout = NULL; // are all these settings necessary? sys_schedblocksize = DEFDACBLKSIZE; sys_externalschedlib = 0; sys_printtostderr = 0; sys_usestdpath = 0; // don't use pd_extrapath, only sys_searchpath sys_debuglevel = 0; sys_verbose = 0; sys_noloadbang = 0; sys_nogui = 1; sys_hipriority = 0; sys_nmidiin = 0; sys_nmidiout = 0; sys_time = 0; pd_init(); libpdreceive_setup(); sys_set_audio_api(API_DUMMY); sys_searchpath = NULL; }
/* this is called instead of sys_main() to start things */ int libpd_init(void) { static int initialized = 0; if (initialized) return -1; // only allow init once (for now) initialized = 1; signal(SIGFPE, SIG_IGN); libpd_start_message(32); // allocate array for message assembly sys_printhook = (t_printhook) libpd_printhook; sys_soundin = NULL; sys_soundout = NULL; // are all these settings necessary? sys_schedblocksize = DEFDACBLKSIZE; sys_externalschedlib = 0; sys_printtostderr = 0; sys_usestdpath = 0; // don't use pd_extrapath, only sys_searchpath sys_debuglevel = 0; sys_verbose = 0; sys_noloadbang = 0; sys_nogui = 1; sys_hipriority = 0; sys_nmidiin = 0; sys_nmidiout = 0; sys_init_fdpoll(); #ifdef HAVE_SCHED_TICK_ARG sys_time = 0; #endif pd_init(); libpdreceive_setup(); sys_set_audio_api(API_DUMMY); sys_searchpath = NULL; #ifdef LIBPD_EXTRA bob_tilde_setup(); bonk_tilde_setup(); choice_setup(); expr_setup(); fiddle_tilde_setup(); loop_tilde_setup(); lrshift_tilde_setup(); pique_setup(); sigmund_tilde_setup(); stdout_setup(); #endif return 0; }