discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Question regarding multiple flow graphs in tx_voice.p


From: Milo Wong
Subject: [Discuss-gnuradio] Question regarding multiple flow graphs in tx_voice.py
Date: Thu, 20 Aug 2009 11:00:03 -0700

Hi all,

I am working on tx_voice.py and I got something I don't quite understand:  As I know that audio_rx samples from audio source and applies GSM encoding with 33bit packages outputs, but there's no connection between txpath and audio_rx. How could 33bits packages be sent to the transmit path? What's the purpose of using multiple flow graphs here? Below is the code FYI.

------------------------------Part of tx_voice.py-----------------------------------------------
class audio_rx(gr.hier_block2):                      ### get voice samples from audio source input
    def __init__(self, audio_input_dev):
    gr.hier_block2.__init__(self, "audio_rx",
                gr.io_signature(0, 0, 0), # Input signature
                gr.io_signature(0, 0, 0)) # Output signature
        sample_rate = 8000  ###Change to 44100 next time
        src = "" audio_input_dev) ### samples from audio source
        ............
        self.connect(src, src_scale, f2s, voice_coder, packet_sink)

    def get_encoded_voice_packet(self):
        return self.packets_from_encoder.delete_head()
       

class my_top_block(gr.top_block):

    def __init__(self, modulator_class, options):
        gr.top_block.__init__(self)
        self.txpath = usrp_transmit_path.usrp_transmit_path(modulator_class, options)
        self.audio_rx = audio_rx(options.audio_input)
    self.connect(self.txpath)                   ###########No connection ###########
    self.connect(self.audio_rx)                #############   Here!       ###########

.......................
---------------------------------------------------------------------------------------------------------

Thanks for all the help,

Sincerely,

Yuan



reply via email to

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