fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] fluidsynth and Unity ?


From: Kjetil Matheussen
Subject: Re: [fluid-dev] fluidsynth and Unity ?
Date: Tue, 23 May 2017 15:55:54 +0200



On Tue, May 23, 2017 at 3:47 PM, Kjetil Matheussen <address@hidden> wrote:


On Tue, May 23, 2017 at 3:43 PM, Kjetil Matheussen <address@hidden> wrote:


On Tue, May 23, 2017 at 12:49 PM, Stéphane Letz <address@hidden> wrote:
Hi,

As anybody ever used fluidsynth in Unity (https://unity3d.com/fr) ? If yes is that any open-source code available somewhere? It no how complex would it be ? (I guess developing  a specific audio driver to connect to Unity audio layer yes ?)


Hi,

If your goal is to play midi files, maybe it's possible to avoid writing a new fluidsynth driver by
manually calling fluid_synth_nwrite_float (or another similar function generating samples) when necessary.

instead of calling fluid_player_join(player), you return to the main loop of the program,
and in the audio callback, you call fulid_synth_nwrite_float() to get samples.


Oh, and this line must probably be removed:

 adriver = new_fluid_audio_driver(settings, synth);
 

And you must also call fluid_sequencer_process before calling fluid_synth_nwrite_float
in the audio callback. I think you can get a fluid_sequencer_t instance out of the player variable.


 


reply via email to

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