Hi Swapnil,

yes, it's possible via the API as well. Should work with something along
these lines (untested code, just for demonstration):

fluid_player_t* player;
fluid_file_renderer_t* renderer;

player = new_fluid_player(synth);
fluid_player_add(player, "/path/to/midifile.mid");

fluid_settings_setint(settings, "synth.parallel-render", 1); /* needed for
fast-render */
fluid_settings_setstr(settings, "audio.file.name", "/path/to/output.wav");

renderer = new_fluid_file_renderer (synth);

while (fluid_player_get_status(player) == FLUID_PLAYER_PLAYING) {
  if (fluid_file_renderer_process_block(renderer)  !=  FLUID_OK) {
    break;
  }
}

delete_fluid_file_renderer(renderer);
delete_fluid_player(player);


Not shown is the synth and settings setup. Please see the /doc/example.c on
how to create and destroy Fluidsynth instances and settings objects.

Cheers,


   Marcus
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to