[Top][All Lists]

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

Re: [fluid-dev] Patch for bad MIDI timing (with large buffer sizes)

From: Bernat Arlandis i Mañó
Subject: Re: [fluid-dev] Patch for bad MIDI timing (with large buffer sizes)
Date: Mon, 16 Mar 2009 19:03:14 +0100
User-agent: Mozilla-Thunderbird (X11/20090103)

Pedro Lopez-Cabanillas escrigué:

The patch is not yet ready. Right. But it is an obvious way to solve two very important goals:
I'm not trying to make a judgement, I just want to better understand the issues and proposed solutions.
* MIDI rendering faster than wall clock (ticket #15)
* Predictable output. Rendering a MIDI sequence several times, to produce exactly the same frame values each time.

I don't agree with you about the locks. In the current implementation, when you render a MIDI file there are two main threads involved: * A thread from the audio driver, sending output frames to the audio device. * The timer thread that triggers MIDI events in the Synthesizer. Using David' solution, we are eliminating the second thread. There is only one now, so there shouldn't be any locking problems between threads.

About the time resolution, it depends only on FLUID_BUFSIZE (=64 frames), because the timer is triggered in fluid_synth_one_block(). For a sample rate = 44100 Hz the resolution is .68 milliseconds, which is enough for me.
The last three lines explain everything. Thank you, I didn't catch it.

I see the problem just when using OSS, I guess Alsa and Jack override the period-size setting.

Bernat Arlandis i Mañó

reply via email to

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