Skip to content

Commit

Permalink
add support for default FAUST file
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreguillot committed Aug 23, 2018
1 parent af14690 commit 43e97ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions external/.default.dsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import("stdfaust.lib");

process = _;
8 changes: 3 additions & 5 deletions src/faustgen_tilde.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ static void *faustgen_tilde_new(t_symbol* s, int argc, t_atom* argv)
t_faustgen_tilde* x = (t_faustgen_tilde *)pd_new(faustgen_tilde_class);
if(x)
{
char default_file[MAXPDSTRING];
sprintf(default_file, "%s/.default", class_gethelpdir(faustgen_tilde_class));
x->f_dsp_factory = NULL;
x->f_dsp_instance = NULL;

Expand All @@ -481,13 +483,9 @@ static void *faustgen_tilde_new(t_symbol* s, int argc, t_atom* argv)
x->f_ui_manager = faust_ui_manager_new((t_object *)x);
x->f_io_manager = faust_io_manager_new((t_object *)x, canvas_getcurrent());
x->f_opt_manager = faust_opt_manager_new((t_object *)x, canvas_getcurrent());
x->f_dsp_name = atom_getsymbolarg(0, argc, argv);
x->f_dsp_name = argc ? atom_getsymbolarg(0, argc, argv) : gensym(default_file);
x->f_clock = clock_new(x, (t_method)faustgen_tilde_autocompile_tick);
faust_opt_manager_parse_compile_options(x->f_opt_manager, argc ? argc-1 : 0, argv ? argv+1 : NULL);
if(!argc)
{
return x;
}
faustgen_tilde_compile(x);
if(!x->f_dsp_instance)
{
Expand Down

0 comments on commit 43e97ed

Please sign in to comment.