> I would like to find a way to sync midi playback with some recorded audio I
> have. I'm not planning on using any audio driver. I want to pull the audio
> data using fluid_synth_write_s16().
>

I'm not quite sure how the fluid_synth_write_s16 interface works, but I
don't think it does its own timing. It simply lets you pull an arbitrary
amount of samples out of the synth whenever you like, right?

So it rather depends on what your sampled audio program looks like, but
typically (when it is a low-level interface, like SDL_Audio), it will
provide you with a buffer of some size, and require that you load precisely
that many samples into it, and it will play along the buffer in real-time,
occasionally asking you to put more samples into the buffer. At that point,
you can just load the precise number of samples from FluidSynth using
fluid_synth_write_s16, and copy those into the buffer (mixing with your
recorded audio).

In a simpler sense, it is entirely up to you how to time it because you can
pull any number of samples you want out of the synthesiser.

(Unless I am mistaken)
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to