|
From: | Chuck Swiger |
Subject: | Re: [Discuss-gnuradio] Audio spectrum inversion - easy & fun |
Date: | Sun, 03 Oct 2004 08:31:16 -0400 |
At 06:21 PM 10/3/2004 +0930, you wrote:
Does linux allow you to open the same device twice? Both calls to audio_sourceand audio_sink open the same device namely /dev/dsp and hence would return two file handles: Running the above demo program with GnuRadio on a NetBSD system will return a "device busy" signal as one would expect. Am I missing something here? What is the secret? :) Also, If I'm not mistaken, the code demonstrated contains a couple of typos:
Hi Berndt - yes there were two typos, the dangers of not having cut-and-paste working.
I cannot speak to the sound card issue on NetBSD - it does work on Linux (RedHat Fedora Core 2) with the sound device built into an Asus A7V motherboard. Is your sound card full duplex? Many are not, and only allow opening for input or output only,
but not both.You could always break the script up into two parts - One records the audio stream to a disk file, and the other plays the disk file back, with the vector mixing in one or the
other. In the first part your 'out' would be something like out = gr.file_sink (gr.sizeof_float, "filename") and in the second your 'src' would be likesrc = gr.file_source (gr.sizeof_float, "filename", X ) // X=1 repeat, X=0 play one time
Good luck! Chuck
[Prev in Thread] | Current Thread | [Next in Thread] |