From: "Pete Barnard" <petebarnard@tiscali.co.uk>
To: alsa-devel@lists.sourceforge.net
Subject: Broken pipe mystery
Date: Sat, 8 Feb 2003 10:21:23 -0000 [thread overview]
Message-ID: <058801c2cf5b$d4f1dfb0$0100a8c0@Pblaptop> (raw)
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
I am using ALSA 0.9.0rc7 and Red Hat Linux 7.2. My sound card is a CS461x.
My computer is a reasonably powerful beast with 512M of RAM and 1Gig clock
speed.
I have written a simple capture program which reads interleaved samples from
the sound card and goes around in a continuous while(1) loop. My program
works perfectly - until it crashes after several hours with the message:
"read from audio interface failed: broken pipe".
I have narrowed it down to the following piece of code. The size of buf is 256 (shorts). Why would the snd_pcm_readi suddenly (randomly?) fail with a broken pipe??? Any ideas or suggestions would be greatly appreciated as I'm struggling with this
annoying (and difficult to debug) problem.
Regards,
Pete
while (1)
{
if ((err = snd_pcm_readi(capture_handle,buf,128)) != 128
{
// this is where it fails after several hours of working
successfully
cout << "read from audio interface failed: " << snd_strerror(err) <<
endl;
exit(1);
}
}
[-- Attachment #2: Type: text/html, Size: 1671 bytes --]
next reply other threads:[~2003-02-08 10:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-08 10:21 Pete Barnard [this message]
2003-02-08 11:13 ` Broken pipe mystery tomasz motylewski
2003-02-08 13:56 ` Pete Barnard
2003-02-10 7:47 ` tomasz motylewski
2003-02-13 20:56 ` Pete Barnard
2003-02-13 23:36 ` Josh Green
2003-02-09 7:36 ` Josh Green
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='058801c2cf5b$d4f1dfb0$0100a8c0@Pblaptop' \
--to=petebarnard@tiscali.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.