Linux Sound subsystem development
 help / color / mirror / Atom feed
* Re: [alsa-user] Re: latencytests results on a Pentium133, again EXCELLENT, 2.1ms.:-)
@ 1999-09-17 10:46 Maarten de Boer
  1999-09-17 17:37 ` David Olofson
  0 siblings, 1 reply; 2+ messages in thread
From: Maarten de Boer @ 1999-09-17 10:46 UTC (permalink / raw)
  To: linux-sound

> My question is : is it really mandatory to use two threads (one for audio in
> an one for audio out).
No.

> What if I do :
> 
> while(1)
> {
>     read(&buffer); // btw I'll be using alsa not oss
>     Process(buffer);
>     write(&buffer);
> }
Works fine. Make sure you do 
(I quote Benno:)
[blocking read/write] write 4 fragments of silence to the output, at this 
point both audio input and audio output will start (or alternatively you 
could trigger the start via ioctl() after the write).

The ALSA latency.c test does it a bit different.

> Isn't it ok ? I suppose some people have already written this kind of app...
Yes, I did. I do use 2 threads, 1 for audio in->process->out, and one for
the GUI (FLTK). It's very easy.

Maarten.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-09-17 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-17 10:46 [alsa-user] Re: latencytests results on a Pentium133, again EXCELLENT, 2.1ms.:-) Maarten de Boer
1999-09-17 17:37 ` David Olofson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox