[visionegg] Re: sound and visionegg (e.g. portaudio): demo codeavailable?
- From: Christophe Pallier <pallier@xxxxxxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Mon, 15 Dec 2003 09:27:23 +0100
Christoph Lehmann wrote:
Christophe, I was just playing around with your python code for sound
presentation:
one question: what does the
while time.get_ticks()-start > n*SOA:
time.delay(10)
..I can comment it out, and nothing happens. It is a delay of 10ms, yes,
just if the onset of the n-th stimulus is later than it "should"
(assuming that on each SOA=2000s the next stimulus shall be played)
Ooops, sorry, this should be
while time.get_ticks()-start < n*SOA:
time.delay(10)
which will wait by steps of 10 msec until the time is reached for playing
the file.
As I said the timing with this is not precise!
I attach playlist.tar.gz, a small C program using SDL and SDL_mixer that
does about the same
but with better control of the timing. Please tell me if you have any
problem with it.
Christophe
- Follow-Ups:
- [visionegg] Re: sound and visionegg (e.g. portaudio): demo codeavailable?
- From: Christophe Pallier
- References:
- [visionegg] Re: sound and visionegg (e.g. portaudio): democode available?
- From: Christoph Lehmann
Other related posts:
- » [visionegg] Re: sound and visionegg (e.g. portaudio): demo codeavailable?
- » [visionegg] Re: sound and visionegg (e.g. portaudio): demo codeavailable?
- » [visionegg] Re: sound and visionegg (e.g. portaudio): demo codeavailable?
- » [visionegg] Re: sound and visionegg (e.g. portaudio): demo codeavailable?
- » [visionegg] Re: sound and visionegg (e.g. portaudio): demo codeavailable?
presentation:
one question: what does the
while time.get_ticks()-start > n*SOA:
time.delay(10)
..I can comment it out, and nothing happens. It is a delay of 10ms, yes,
just if the onset of the n-th stimulus is later than it "should"
(assuming that on each SOA=2000s the next stimulus shall be played)
which will wait by steps of 10 msec until the time is reached for playing the file. As I said the timing with this is not precise!
- [visionegg] Re: sound and visionegg (e.g. portaudio): demo codeavailable?
- From: Christophe Pallier
- [visionegg] Re: sound and visionegg (e.g. portaudio): democode available?
- From: Christoph Lehmann