From: Tony Hardie-Bick <tonyhb@easynet.co.uk>
To: alsa-devel@lists.sourceforge.net
Subject: Broken pipe problems (with details)
Date: Sat, 20 Jul 2002 15:06:05 +0000 [thread overview]
Message-ID: <20020720150605.A531@siberia> (raw)
Hi,
I'm writing an app that does audio analysis in real time. It works fine
under OSS. Moved to a laptop for demo purposes, using ALSA, and I've
found it incredibly difficult to reliably get audio from the soundcard. I
am considering using JACK, since it's clear that may save a lot of pain
long term. However, I would like to avoid recoding for now, if there is
something simple I am doing wrong with ALSA.
Basically, with a short input buffer of around 2000 frames (using stereo
16 bit 44.1kHz, no output stream) I can get the app to run until I call
up any other system resources, ie, start another app, or just flick
windows under KDE, thus causing some scheduling adjustment. Then it just
gives up. I get a "Broken pipe" error returned from the snd_pcm_readi()
call. snd_pcm_prepare() and snd_pcm_resume() aren't able to deal with
this, and so I'm left with setting up the whole connection all over again,
which surely shouldn't be necessary.
I have based the code on the latency.c example app, but am posting now,
rather than go through all the other possible methods that are given
in latency.c. In the present app, there is no problem with occasionally
losing a few milliseconds of audio data.
Thanks in advance,
Tony
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
reply other threads:[~2002-07-20 15:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020720150605.A531@siberia \
--to=tonyhb@easynet.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.