All of lore.kernel.org
 help / color / mirror / Atom feed
* Broken pipe mystery
@ 2003-02-08 10:21 Pete Barnard
  2003-02-08 11:13 ` tomasz motylewski
  2003-02-09  7:36 ` Josh Green
  0 siblings, 2 replies; 7+ messages in thread
From: Pete Barnard @ 2003-02-08 10:21 UTC (permalink / raw)
  To: alsa-devel

[-- 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 --]

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

end of thread, other threads:[~2003-02-13 23:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-08 10:21 Broken pipe mystery Pete Barnard
2003-02-08 11:13 ` 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

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.