[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Instance creation

From: Tom M.
Subject: Re: [fluid-dev] Instance creation
Date: Sun, 26 Mar 2017 10:03:37 +0200

> ...but I am not able to see an instance of fluidsynth being created in my processes.

Why should you see it? You are not executing the fluidsynth executable. You are executing your own program which uses fluidsynth's API, i.e. libfluidsynth.dylib gets linked to build/exec during compilation. When executing exec, libfluidsynth.dylib gets loaded and exec becomes your "fluidsynth" instance. >From my understanding you just want to execute fluidsynth from a C program, which should be possible by doing something like:

char const * parmList[] = {"-a", "jack", NULL};
execv("/path/to/fluidsynth", parmList);


2017-03-26 8:00 GMT+02:00 Anuj Deshpande <address@hidden>:


I am trying to create a new instance of fluidsynth from a C program -

#include "../fluidsynth-1.1.6/include/fluidsynth.h"

void fs_init(){

  printf("### Begin fs_init ### \r\n");
  fluid_settings_t* settings;
  fluid_synth_t* synth;
  fluid_audio_driver_t* adriver;
  settings = new_fluid_settings();

  /* Set the synthesizer settings, if necessary */
  printf("Creating new synth .. \r\n");
  synth = new_fluid_synth(settings);
  printf("Creating new audio driver.. \r\n");
  fluid_settings_setstr(settings, "audio.driver", "coreaudio");
  adriver = new_fluid_audio_driver(settings, synth);


My build instruction looks like -

$(CC) -o build/exec -g -Wall src/main.c /usr/local/lib/libfluidsynth.dylib -lm

The program builds fine, but I am not able to see an instance of fluidsynth being created in my processes. 

What would be the correct way to invoke fluidsynth from within another program? Is there a sample code/project available?


fluid-dev mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]