summaryrefslogtreecommitdiff
path: root/gr-uhd/apps/hf_radio/output.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-uhd/apps/hf_radio/output.py')
-rw-r--r--gr-uhd/apps/hf_radio/output.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/gr-uhd/apps/hf_radio/output.py b/gr-uhd/apps/hf_radio/output.py
index dc9caf528..251d863bc 100644
--- a/gr-uhd/apps/hf_radio/output.py
+++ b/gr-uhd/apps/hf_radio/output.py
@@ -5,12 +5,16 @@
from gnuradio import gr, gru
from gnuradio import audio
-class output( gr.hier_block ):
- def __init__( self, fg, rate ):
- self.out = audio.sink( rate )
+class output( gr.hier_block2 ):
+ def __init__( self, rate, device ):
+ gr.hier_block2.__init__(self, "output",
+ gr.io_signature(1,1,gr.sizeof_float),
+ gr.io_signature(0,0,0))
+
self.vol = gr.multiply_const_ff( 0.1 )
- fg.connect( self.vol, self.out )
- gr.hier_block.__init__(self, fg, self.vol, None )
+ self.out = audio.sink( int(rate), device )
+
+ self.connect( self, self.vol, self.out )
def set( self, val ):
self.vol.set_k( val )