Re: [linux-audio-dev] MIDI sync issues; mmc, mtc, ...

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] MIDI sync issues; mmc, mtc, ...
From: Kai Vehmanen (kaiv_AT_wakkanet.fi)
Date: Thu Dec 21 2000 - 09:50:58 EET


On Tue, 19 Dec 2000, Paul Barton-Davis wrote:

> ps. i believe that most of the sync issues i mentioned in those
> mid-year emails were all solved and/or were red-herrings. the one
> remaining hard part for ardour is that i don't believe its safe to
> send the MTC data from the audio thread, and i don't yet have a scheme
> that i trust for getting it sent on time via a different thread.

Just the thing I meant bring up next. Now even if its doable to implement
a steady, outgoing MTC stream from a userspace app, it still seems
difficult to combine it to an existing audio app. If we generate the
MTC-bytes in the audio loop, MTC accuracy depends on the used buffersize
(1024 samples frames at 44100kHz -> 23ms per iteration). Also, writing
directly to midi-devices from the audio thread, we risk blocking the audio
operations. So it would look like we need to do the midi i/o from
another thread - either put a ringbuffer between the audio and midi
threads or have the midi thread generate the MTC-bytes itself.

Another thing (probably ecasound-specific problem) is what time to
actually use when generating MTC. For a wall-clock sync, it's reasonable
to use the "engine-time", ie. how many samples have passed the main engine
loop. But this won't do if we want to use MTC for syncing audio. Then we
need to use soundcard's current pointer to calculate the current time...

-- 
 . http://www.eca.cx ... [ audio software for linux ] /\ . 
 . http://www.eca.cx/sculpscape [ my armchair-tunes mp3/ra/wav ]


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Dec 21 2000 - 17:02:22 EET