Gr.message_source question

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 --------------------------

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs