diff options
author | Håkon Vågsether <haakonsv@gmail.com> | 2017-09-24 12:16:22 +0200 |
---|---|---|
committer | Håkon Vågsether <haakonsv@gmail.com> | 2017-10-10 10:49:36 +0200 |
commit | baf7eaf8f29d5a490f2580917362cf5b3db47281 (patch) | |
tree | 7afab4ee2dfa6439ecf95d47aa68996020ea04c5 /gr-audio/grc | |
parent | 6fa9d33246251f44a0e78682e50e9a1cb0b03171 (diff) |
Added auto-generated YAML blocks
Diffstat (limited to 'gr-audio/grc')
-rw-r--r-- | gr-audio/grc/CMakeLists.txt | 4 | ||||
-rw-r--r-- | gr-audio/grc/audio_sink.block.yml | 49 | ||||
-rw-r--r-- | gr-audio/grc/audio_sink.xml | 87 | ||||
-rw-r--r-- | gr-audio/grc/audio_source.block.yml | 49 | ||||
-rw-r--r-- | gr-audio/grc/audio_source.xml | 87 |
5 files changed, 100 insertions, 176 deletions
diff --git a/gr-audio/grc/CMakeLists.txt b/gr-audio/grc/CMakeLists.txt index 7da5fbc352..ead168ee4c 100644 --- a/gr-audio/grc/CMakeLists.txt +++ b/gr-audio/grc/CMakeLists.txt @@ -18,5 +18,5 @@ # Boston, MA 02110-1301, USA. ######################################################################## -file(GLOB xml_files "*.xml") -install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR}) +file(GLOB yml_files "*.yml") +install(FILES ${yml_files} DESTINATION ${GRC_BLOCKS_DIR}) diff --git a/gr-audio/grc/audio_sink.block.yml b/gr-audio/grc/audio_sink.block.yml new file mode 100644 index 0000000000..05dd947f81 --- /dev/null +++ b/gr-audio/grc/audio_sink.block.yml @@ -0,0 +1,49 @@ +id: audio_sink +label: Audio Sink +category: '[Core]/Audio' +flags: throttle + +parameters: +- id: samp_rate + label: Sample Rate + dtype: int + default: samp_rate + options: ['16000', '22050', '24000', '32000', '44100', '48000'] + option_labels: [16KHz, 22.05KHz, 24KHz, 32KHz, 44.1KHz, 48KHz] +- id: device_name + label: Device Name + dtype: string + hide: ${ ('none' if device_name else 'part') } +- id: ok_to_block + label: OK to Block + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + hide: part +- id: num_inputs + label: Num Inputs + dtype: int + default: '1' + hide: part + +inputs: +- domain: stream + dtype: float + multiplicity: ${ num_inputs } + +asserts: +- ${ 0 < num_inputs } + +templates: + imports: from gnuradio import audio + make: audio.sink(${samp_rate}, ${device_name}, ${ok_to_block}) + +documentation: |- + Not all sampling rates will be supported by your hardware. + + Leave the device name blank to choose deafult audio device. ALSA users with audio trouble may try setting the device name to plughw:0,0 + + The audio sink can have multiple inputs depending upon your hardware. For example, set the inputs to 2 for stereo audio. + +file_format: 1 diff --git a/gr-audio/grc/audio_sink.xml b/gr-audio/grc/audio_sink.xml deleted file mode 100644 index 9181055cd9..0000000000 --- a/gr-audio/grc/audio_sink.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Audio Sink -################################################### - --> -<block> - <name>Audio Sink</name> - <key>audio_sink</key> - <category>[Core]/Audio</category> - <flags>throttle</flags> - <import>from gnuradio import audio</import> - <make>audio.sink($samp_rate, $device_name, $ok_to_block)</make> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <value>samp_rate</value> - <type>int</type> - <option> - <name>16KHz</name> - <key>16000</key> - </option> - <option> - <name>22.05KHz</name> - <key>22050</key> - </option> - <option> - <name>24KHz</name> - <key>24000</key> - </option> - <option> - <name>32KHz</name> - <key>32000</key> - </option> - <option> - <name>44.1KHz</name> - <key>44100</key> - </option> - <option> - <name>48KHz</name> - <key>48000</key> - </option> - </param> - <param> - <name>Device Name</name> - <key>device_name</key> - <value></value> - <type>string</type> - <hide>#if $device_name() then 'none' else 'part'#</hide> - </param> - <param> - <name>OK to Block</name> - <key>ok_to_block</key> - <value>True</value> - <type>enum</type> - <hide>part</hide> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>1</value> - <type>int</type> - </param> - <check>0 < $num_inputs</check> - <sink> - <name>in</name> - <type>float</type> - <nports>$num_inputs</nports> - </sink> - <doc> -Not all sampling rates will be supported by your hardware. - -Leave the device name blank to choose deafult audio device. \ -ALSA users with audio trouble may try setting the device name to plughw:0,0 - -The audio sink can have multiple inputs depending upon your hardware. \ -For example, set the inputs to 2 for stereo audio. - </doc> -</block> diff --git a/gr-audio/grc/audio_source.block.yml b/gr-audio/grc/audio_source.block.yml new file mode 100644 index 0000000000..cf22ab3cbe --- /dev/null +++ b/gr-audio/grc/audio_source.block.yml @@ -0,0 +1,49 @@ +id: audio_source +label: Audio Source +category: '[Core]/Audio' +flags: throttle + +parameters: +- id: samp_rate + label: Sample Rate + dtype: int + default: samp_rate + options: ['16000', '22050', '24000', '32000', '44100', '48000'] + option_labels: [16KHz, 22.05KHz, 24KHz, 32KHz, 44.1KHz, 48KHz] +- id: device_name + label: Device Name + dtype: string + hide: ${ ('none' if device_name else 'part') } +- id: ok_to_block + label: OK to Block + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + hide: part +- id: num_outputs + label: Num Outputs + dtype: int + default: '1' + hide: part + +outputs: +- domain: stream + dtype: float + multiplicity: ${ num_outputs } + +asserts: +- ${ 0 < num_outputs } + +templates: + imports: from gnuradio import audio + make: audio.source(${samp_rate}, ${device_name}, ${ok_to_block}) + +documentation: |- + Not all sampling rates will be supported by your hardware. + + Leave the device name blank to choose deafult audio device. ALSA users with audio trouble may try setting the device name to plughw:0,0 + + The audio source can have multiple outputs depending upon your hardware. For example, set the outputs to 2 for stereo audio. + +file_format: 1 diff --git a/gr-audio/grc/audio_source.xml b/gr-audio/grc/audio_source.xml deleted file mode 100644 index 044b14466f..0000000000 --- a/gr-audio/grc/audio_source.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Audio Source -################################################### - --> -<block> - <name>Audio Source</name> - <key>audio_source</key> - <category>[Core]/Audio</category> - <flags>throttle</flags> - <import>from gnuradio import audio</import> - <make>audio.source($samp_rate, $device_name, $ok_to_block)</make> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <value>samp_rate</value> - <type>int</type> - <option> - <name>16KHz</name> - <key>16000</key> - </option> - <option> - <name>22.05KHz</name> - <key>22050</key> - </option> - <option> - <name>24KHz</name> - <key>24000</key> - </option> - <option> - <name>32KHz</name> - <key>32000</key> - </option> - <option> - <name>44.1KHz</name> - <key>44100</key> - </option> - <option> - <name>48KHz</name> - <key>48000</key> - </option> - </param> - <param> - <name>Device Name</name> - <key>device_name</key> - <value></value> - <type>string</type> - <hide>#if $device_name() then 'none' else 'part'#</hide> - </param> - <param> - <name>OK to Block</name> - <key>ok_to_block</key> - <value>True</value> - <type>enum</type> - <hide>part</hide> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <param> - <name>Num Outputs</name> - <key>num_outputs</key> - <value>1</value> - <type>int</type> - </param> - <check>0 < $num_outputs</check> - <source> - <name>out</name> - <type>float</type> - <nports>$num_outputs</nports> - </source> - <doc> -Not all sampling rates will be supported by your hardware. - -Leave the device name blank to choose deafult audio device. \ -ALSA users with audio trouble may try setting the device name to plughw:0,0 - -The audio source can have multiple outputs depending upon your hardware. \ -For example, set the outputs to 2 for stereo audio. - </doc> -</block> |