David Henningsson wrote: > So after having improved the midi player patch a bit, I went to try > fixing #15, but I'm a little unsure of how to implement it in the file > driver the best way. [...] > Or should we bypass the generic audio driver and make fluidsynth.c > depend directly on aufile? Or perhaps even create a separate driver for > this purpose?
After thinking again about this, yes. The audio file driver is used for a different thing, and it would be a mess if you try to convert it for this purpose. So, what about creating a new public function, say fluid_midi_renderer() or something like that, with two parameters: a MIDI input, and an audio output file names. Set the slave timer on it, initialize the MIDI player, and do a simple loop, writting audio buffers to the output file until the player has finished. It is not needed a new driver, nor a thread. If you prefer, create a new set of functions fluid_midi_renderer_* with a callback for the clients wanting to write the output file by themselves. What I mean is that the MIDI rendering process, faster than realtime, is a totally new and different problem, and so the solution should also require a new interface. > >> I don't plan to solve either one currently, my current goal is to fix > >> #15. > > > > OK. I would open a new ticket for this bug, if you don't open it > > yourself. > > Possibly there should be two tickets, one for each subproblem. I've already opened the ticket: http://fluidsynth.resonance.org/trac/ticket/24 Regards, Pedro _______________________________________________ fluid-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/fluid-dev
