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.source(sample_rate, 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
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio