Difference between revisions of "Audio Source"

From GNU Radio
Jump to: navigation, search
(add Example Flowgraph)
(revise details, give an example)
Line 6: Line 6:
 
== Parameters ==
 
== Parameters ==
  
; Sample Rate
+
=== Sample Rate ===
: Audio sampling rate used, click the drop-down menu to see popular rates.  Note, not all sampling rates will be supported by your hardware. For typical applications, this should be set to 48kHz.  
+
To set the Audio sampling rate, click the drop-down menu to see popular rates.  Note: not all sampling rates will be supported by your hardware. For typical applications, this should be set to 48kHz.  
  
; Device Name
+
=== Device Name ===
: Leave the device name blank to choose default audio device. Other typical choices include:
+
Leave the device name blank to choose the default audio device. Other typical choices include:
# pulse
+
* pulse
# hw:0,0
+
* hw:0,0
# plughw:0,0
+
* plughw:0,0
# surround51
+
* /dev/dsp
# /dev/dsp
+
For ALSA users with audio trouble, follow this procedure:
: ALSA users with audio trouble may try setting the device name to plughw:0,0
+
* from a terminal window enter:
 +
<code>arecord -L</code>
 +
* find the entry such as:
 +
<pre>
 +
  hw:CARD=Device,DEV=0
 +
      USB Audio Device, USB Audio
 +
      Direct hardware device without any conversions
 +
</pre>
 +
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from the list which matches your device.
 +
* use the first line of that entry (e.g. "hw:CARD=Device,DEV=0") as the device name (without the quotes).
  
; OK to Block
+
=== OK to Block ===
: On by default, which should be used when this sink is not throttled by any other block.
+
On by default, which should be used when this sink is not throttled by any other block.
  
 
== Example Flowgraph ==
 
== Example Flowgraph ==

Revision as of 00:05, 29 October 2019

Acts as a microphone input. See Audio Sink for a block that outputs to a speaker.

Not all sampling rates will be supported by your hardware. The audio source can have multiple outputs depending upon your hardware. For example, set the outputs to 2 for stereo audio.

Parameters

Sample Rate

To set the Audio sampling rate, click the drop-down menu to see popular rates. Note: not all sampling rates will be supported by your hardware. For typical applications, this should be set to 48kHz.

Device Name

Leave the device name blank to choose the default audio device. Other typical choices include:

  • pulse
  • hw:0,0
  • plughw:0,0
  • /dev/dsp

For ALSA users with audio trouble, follow this procedure:

  • from a terminal window enter:

arecord -L

  • find the entry such as:
   hw:CARD=Device,DEV=0
       USB Audio Device, USB Audio
       Direct hardware device without any conversions

      from the list which matches your device.

  • use the first line of that entry (e.g. "hw:CARD=Device,DEV=0") as the device name (without the quotes).

OK to Block

On by default, which should be used when this sink is not throttled by any other block.

Example Flowgraph

This flowgraph shows the Audio Source block feeding a radioteletype (RTTY) decoder.

RTTY rcv.png