summaryrefslogtreecommitdiff
path: root/gr-blocks/grc
diff options
context:
space:
mode:
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