summaryrefslogtreecommitdiff
path: root/gr-blocks/grc/blocks_wavfile_source.block.yml
blob: 387bef3afb2cd0fd5b20cda14c51d8f70af9bb72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
id: blocks_wavfile_source
label: Wav File Source
flags: [ python, cpp ]

parameters:
-   id: file
    label: File
    dtype: file_open
-   id: repeat
    label: Repeat
    dtype: enum
    default: 'True'
    options: ['True', 'False']
    option_labels: ['Yes', 'No']
-   id: nchan
    label: N Channels
    dtype: int
    default: '1'
    hide: part

outputs:
-   domain: stream
    dtype: float
    multiplicity: ${ nchan }

asserts:
- ${ 1 <= nchan }

templates:
    imports: from gnuradio import blocks
    make: blocks.wavfile_source(${file}, ${repeat})

cpp_templates:
    includes: ['#include <gnuradio/blocks/wavfile_source.h>']
    declarations: 'blocks::wavfile_source::sptr ${id};'
    make: 'this->${id} = blocks::wavfile_source::make(${file}, ${repeat});'
    translations:
        'True': 'true'
        'False': 'false'

file_format: 1