From: Maarten de Boer <maarten.deboer@iua.upf.es>
To: linux-sound@vger.kernel.org
Subject: Re: [alsa-user] Re: latencytests results on a Pentium133, again EXCELLENT, 2.1ms.:-)
Date: Fri, 17 Sep 1999 10:46:52 +0000 [thread overview]
Message-ID: <marc-linux-sound-93756643831266@msgid-missing> (raw)
> 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.
next reply other threads:[~1999-09-17 10:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-17 10:46 Maarten de Boer [this message]
1999-09-17 17:37 ` [alsa-user] Re: latencytests results on a Pentium133, again EXCELLENT, 2.1ms.:-) David Olofson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-sound-93756643831266@msgid-missing \
--to=maarten.deboer@iua.upf.es \
--cc=linux-sound@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox