[visionegg] Re: sound and visionegg (e.g. portaudio): demo codeavailable?

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


Other related posts: