[linux-audio-dev] best option for audiovisual synchrony

From: Simon Barthelmé <simon.barthelme@email-addr-hidden-paris5.fr>
Date: Fri Oct 20 2006 - 15:39:46 EEST

Hi all,

We're in the process of porting an open source Matlab toolbox to Linux
called the Psychtoolbox. It's a piece of software that's widely used
within neuroscience and psychophysics, to display graphics and play
sounds in experiments. It uses OpenGl for its graphics backend, and
right now the sound support is just matlab's, which is really poor.

A lot of us researchers are interested in audiovisual experiments, where
we study how the brain combines auditory and visual information (for
example in speech perception).

Concretely speaking, that means we need to get as precise a timing and
synchrony as we can possibly get. A typical experiment will go
something like this :
- display a flash and, at the same time, play a beep
- wait for response

The tricky bit is of course getting a flash that's totally synchronous
with the beep. Absolute synchrony is not achievable without dedicated
hardware, but we need to get an approximation that's within the few ms
range.

 From what I've read it seems that Linux is a pretty good platform for
that, since it has low latency/real time support.
What I need to know is how I should go about implementing some kind of
FlashAndBeep function, that guarantees that the sound starts playing as
soon as the display buffer is flipped, with the shortest predictable
delay possible.

Is ALSA the way to go ? JACK maybe ? Anything else ?

I'd love to read about any piece of advice you might have. Do ask me if
you need more details.

Thanks a lot,

Simon Barthelmé
PhD Student
Laboratoire de Psychologie de la Perception
CNRS/Université Paris V

lpp.psycho.univ-paris5.fr
Received on Fri Oct 20 16:15:03 2006

This archive was generated by hypermail 2.1.8 : Fri Oct 20 2006 - 16:15:03 EEST