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

Simon Barthelmé simon.barthelme at univ-paris5.fr
Fri Oct 20 12:39:46 UTC 2006


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






More information about the Linux-audio-dev mailing list