Gr.message_source question


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


    self._message_source = gr.message_source(4) #Is this the right

self._message_queue = self._message_source.msgq()

def enqueue_pkt(self, pkt):
    """This will take UPD pakcets, converts them into stream

and enqueue to the message queue
msg_sptr = gr.message_from_string(pkt)

        audio_sink = audio.sink(48000)

    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