Difference between revisions of "Audio Sink"

From GNU Radio
Jump to: navigation, search
(revised Parameters section)
 
(3 intermediate revisions by one other user not shown)
Line 4: Line 4:
 
== Parameters ==
 
== Parameters ==
  
# '''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.
+
=== Sample Rate ===
# '''Device Name''': Leave the device name blank to choose default audio device. ALSA users with audio trouble may try setting the device name to plughw:0,0
+
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.  
# '''OK to Block''':
 
# '''Num Inputs''': The audio sink can have multiple inputs depending upon your hardware. For example, set the inputs to 2 for stereo audio, or 1 for mono.
 
  
For issues or debugging see https://wiki.gnuradio.org/index.php/ALSAPulseAudio
+
=== Device Name ===
 +
Leave the device name blank to choose the default audio device. Other typical choices include:
 +
* pulse
 +
* hw:0,0
 +
* plughw:0,0
 +
For ALSA users with audio trouble, follow this procedure:
 +
* from a terminal window enter:
 +
<code>aplay -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).
 +
 
 +
* For issues or debugging see https://wiki.gnuradio.org/index.php/ALSAPulseAudio
 +
 
 +
=== OK to Block ===
 +
On by default, which should be used when this sink is not throttled by any other block.
 +
 
 +
=== Num Inputs ===
 +
The audio sink can have multiple inputs depending upon your hardware. For example, set the inputs to 2 for stereo or 1 for mono.
  
 
== Example Flowgraph ==
 
== Example Flowgraph ==
  
This flowgraph should play a 1 kHz tone out of your speakers.  Note that you don't need a throttle block, the Audio Sink should throttle for you.
+
This flowgraph should play a 1 kHz tone out of your speakers.  Note that you don't need a throttle block, the Audio Sink should throttle for you.  If you do end up using an already-throttled signal source, then set "OK to Block" to No.
  
[[File:audio-sink-ex.png|500px]]
+
[[File:audio-sink-ex.png|400px]]

Latest revision as of 02:10, 30 October 2019

Allows a signal to be played through your speakers or other audio device

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

For ALSA users with audio trouble, follow this procedure:

  • from a terminal window enter:

aplay -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.

Num Inputs

The audio sink can have multiple inputs depending upon your hardware. For example, set the inputs to 2 for stereo or 1 for mono.

Example Flowgraph

This flowgraph should play a 1 kHz tone out of your speakers. Note that you don't need a throttle block, the Audio Sink should throttle for you. If you do end up using an already-throttled signal source, then set "OK to Block" to No.

Audio-sink-ex.png