Output to Multiple Devices

OSS specific BSD discussion (FreeBSD/NetBSD/OpenBSD)

Moderators: hannu, dev, cesium

New Member
Posts: 7
Joined: Fri Apr 21, 2006 7:49 am

Output to Multiple Devices

Postby mixx941 » Sun Jun 11, 2006 2:52 am

Hi. I'm not sure if my subject is a correct description, but I'm trying to do the following:

Take the input from line in, run it through an audio processing program, and output it again to stream it over the internet using Darkice. I can already take it from the line in, process it, and play the processed sound back to /dev/dsp5 which plays on my speakers. For that, I do this:

cat /dev/dsp | ./processing_program | cat > /dev/dsp5

It sounds great. Now I'm trying to get this same sound into Darkice, but it is not able to use /dev/dsp5 (I'm guessing since it's already in use and playing on my speakers). I've used Darkice plenty with just recording from /dev/dsp and that works, but I'm wondering on the OSS end if there is a way to somehow copy /dev/dsp5 to maybe /dev/dsp6 so Darkice could get it and stream it at the same time. Also, I don't HAVE to hear it, so if there is a way just to get it into a dsp that Darkice could tap into without me hearing it on the speakers, that would work too.

Thanks in advance! :)


New Member
Posts: 1
Joined: Tue Aug 15, 2006 1:13 pm

Postby fabian » Tue Aug 15, 2006 1:22 pm

Hi Mark,

It seems to me that you do not need the dsp devices for relaying audio to another app. dsp devices are for playback and recording.

I would try to create a named pipe and then send the output of the processing program to that pipe and set darkice to use the named pipe as oss input.

$ mkfifo named_pipe
$ cat /dev/dsp | ./processing_program > named_pipe

If you would also like to copy the audio to your speakers you can use the tee utility:

$ cat /dev/dsp | ./processing_program | tee /dev/dsp5 > named_pipe

Good luck!


Return to “BSD”

Who is online

Users browsing this forum: No registered users and 4 guests