All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with: Broken Pipe
@ 2003-07-24 13:48 Holger Rostalski
  2003-07-24 19:35 ` Paul Davis
  0 siblings, 1 reply; 2+ messages in thread
From: Holger Rostalski @ 2003-07-24 13:48 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

moin.
i have a problem with development of a soundapplication for Linux 8.2 
with ALSA 0.9.0


if i take the "Minimal Interrupt Driven -Program" from the tutorial (in 
attachments) and changed a little bit the
play_callback-methode, i got at start a
"broken Pipe" error.

what means it?

my changes:
================
       int
	playback_callback (snd_pcm_sframes_t nframes)
	{
		int err;
	
		printf ("playback callback called with %u frames\n", nframes);
		unsigned char data[4*4096];
		for (int x=0; x<4096; x++)
		{
			buf[x]=10*x;
				data[4*x]=(unsigned char) buf[x];
				data[4*x+1]=buf[x] >> 8;
				data[4*x+2]=(unsigned char) buf[x];
				data[4*x+3]=buf[x] >> 8;
			cout << "test" << x;

			
		};
	
		if ((err = snd_pcm_writei (playback_handle, data, 4096)) < 0) {
			fprintf (stderr, "write failed (%s)\n", 	snd_strerror (err));
		}
	
		return err;
	}




-> if i delete the cout-command, the programm works fine...but with cout 
(or with fprint ) i got "broken pipe". ...

 >>>>>>>>>   this is only the simplest way to reproduce the error. my 
programm has much more code. <<<<<<<<<<<<<<<<<<<<<





greetz
Holger

[-- Attachment #2: alsa-audio--docu.html --]
[-- Type: text/html, Size: 25402 bytes --]

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

end of thread, other threads:[~2003-07-24 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-24 13:48 Problem with: Broken Pipe Holger Rostalski
2003-07-24 19:35 ` Paul Davis

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.