lee writes:
And leftchannel_pipe is supposed to be an array? Without seeing more of
your program, we're left in the dark ...
Now that I got it working, here it is. All this does is
to give you an 8-bit 8000 sample per second audio feed from both
the left and right channels of the sound
Ivan Jager writes:
Rather than using fwrite() you could just use write(), which takes a
file descriptor. Alternately, if you really want to use fwrite or
other stdio functions rather than the *nix syscalls, you could
use fdopen() to get a FILE* corresponding to the pipe's fd.
If you check
Martin McCormick mar...@x.it.okstate.edu writes:
Ivan Jager writes:
if( write(leftchannel_pipe[1], leftbyte, 1) 0)
if ((leftchannel_pipe[0] = fdopen(leftdata,r)) == NULL) {
And leftchannel_pipe is supposed to be an array? Without seeing more of
your program, we're left in
I want to send two output streams from a code module I wrote to
two pipes so that other programs can read the streams.
The rest of the module works but I am doing something
wrong when writing to a pipe.
The way I understand pipes, you write to one end. A
small buffer fills and
On Thu, Jul 14, 2011 at 06:30:21AM -0500, Martin McCormick scribbled:
#After the step, we should have two file descriptors.
(gdb) output leftchannel_pipe
{7, 8}
[...]
#that also looks right, but let's try to write to leftchannel_pipe.
main () at 2pipes.c:98
98
5 matches
Mail list logo