summaryrefslogtreecommitdiff
path: root/gnuradio-examples/python/apps/hf_radio/output.py
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-examples/python/apps/hf_radio/output.py')
-rw-r--r--gnuradio-examples/python/apps/hf_radio/output.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/gnuradio-examples/python/apps/hf_radio/output.py b/gnuradio-examples/python/apps/hf_radio/output.py
new file mode 100644
index 000000000..dc9caf528
--- /dev/null
+++ b/gnuradio-examples/python/apps/hf_radio/output.py
@@ -0,0 +1,17 @@
+# Audio output with a volume control.
+#
+# M. Revnell 2005-Dec
+
+from gnuradio import gr, gru
+from gnuradio import audio
+
+class output( gr.hier_block ):
+ def __init__( self, fg, rate ):
+ self.out = audio.sink( rate )
+ self.vol = gr.multiply_const_ff( 0.1 )
+ fg.connect( self.vol, self.out )
+ gr.hier_block.__init__(self, fg, self.vol, None )
+
+ def set( self, val ):
+ self.vol.set_k( val )
+