summaryrefslogtreecommitdiff
path: root/gr-blocks/grc
diff options
context:
space:
mode:
authorjapm48 <japm48@users.noreply.github.com>2020-04-16 22:52:42 +0200
committerMichael Dickens <michael.dickens@ettus.com>2020-04-19 15:56:11 -0400
commit03d92ac19a11356175533aae4ad5804a354be075 (patch)
tree3de2095ab563c85ad33c2f5c02b20a9c282967f4 /gr-blocks/grc
parent6cc845400200fdc20f9a8101c37d9a4bd0afa356 (diff)
blocks: wav: add missing changes
Add append option to grc file.
Diffstat (limited to 'gr-blocks/grc')
-rw-r--r--gr-blocks/grc/blocks_wavfile_sink.block.yml13
1 files changed, 11 insertions, 2 deletions
diff --git a/gr-blocks/grc/blocks_wavfile_sink.block.yml b/gr-blocks/grc/blocks_wavfile_sink.block.yml
index 5139a17244..4fd6aef5e5 100644
--- a/gr-blocks/grc/blocks_wavfile_sink.block.yml
+++ b/gr-blocks/grc/blocks_wavfile_sink.block.yml
@@ -19,6 +19,12 @@ parameters:
label: Bits per Sample
dtype: int
default: '8'
+- id: append
+ label: Append to existing file
+ dtype: enum
+ default: 'False'
+ options: ['True', 'False']
+ option_labels: ['Yes', 'No']
inputs:
- domain: stream
@@ -30,7 +36,7 @@ asserts:
templates:
imports: from gnuradio import blocks
- make: blocks.wavfile_sink(${file}, ${nchan}, ${samp_rate}, ${bits_per_sample})
+ make: blocks.wavfile_sink(${file}, ${nchan}, ${samp_rate}, ${bits_per_sample}, ${append})
callbacks:
- open(${file})
@@ -38,9 +44,12 @@ cpp_templates:
includes: ['#include <gnuradio/blocks/wavfile_sink.h>']
declarations: 'blocks::wavfile_sink::sptr ${id};'
make: |-
- this->${id} = blocks::wavfile_sink::make(${file}${'.c_str()' if str(file)[0] != "'" and str(file)[0] != "\"" else ''}, ${nchan}, ${samp_rate}, ${bits_per_sample});
+ this->${id} = blocks::wavfile_sink::make(${file}${'.c_str()' if str(file)[0] != "'" and str(file)[0] != "\"" else ''}, ${nchan}, ${samp_rate}, ${bits_per_sample}, ${append});
callbacks:
## TODO Handle std::string type when const char* argument is needed
- this->${id}->open(${file})
+ translations:
+ 'True': 'true'
+ 'False': 'false'
file_format: 1