discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] gr.message_source question


From: George Nychis
Subject: Re: [Discuss-gnuradio] gr.message_source question
Date: Mon, 14 Jan 2008 19:27:17 -0500
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

It's possible that your sound card is being used by another application. For example, firefox or audacious is using the card. Make sure you're in the sound group and have permission to the device also.

- George


W. David Li wrote:
Hi,

I got a python class that contains a gr.message_source as in the
following. When UDP packets came in "enqueue_pkt" was called. Packets
were converted into stream and inserted into a gr.msg_queue. Now I tried
to dump the stream to an audio device by connecting the message_source
to an audio sink. I got an error message:

          audio_alsa_sink[hw:0,0]: Device or resource busy

What went wrong here?

- David

---------------- code snipets ---------------

class source(gr.hier_block2):
def __init__(self): gr.hier_block2.__init__(self,
                                "local_vrf_source",
                                gr.io_signature(0,0,0),
                                gr.io_signature(0,0,0))
self._message_source = gr.message_source(4) #Is this the right
size?
        self._message_queue  = self._message_source.msgq()

def enqueue_pkt(self, pkt):
        """This will take UPD pakcets, converts them into stream
gr_messsage
        and enqueue to the message queue
""" try: msg_sptr = gr.message_from_string(pkt) self._message_queue.insert_tail(msg_sptr) audio_sink = audio.sink(48000)
            self.connect(self._message_source,audio_sink)
except Exception,e:
            print 'source:  exception: ', e

----------------- end of code snipets --------------------------



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio





reply via email to

[Prev in Thread] Current Thread [Next in Thread]