Proposed update to WAV file sink

Currently, the XML for the WAV file sink uses a “file_save” type for the
filename variable. This looks like it precludes setting the filename at
runtime, and thus having a callback that allows you to switch to a new
output filename at runtime.

So, I’m proposing changing it to a “string” type in the XML, and
inserting a callback on that parameter so the value can be changed at
runtime,
calling the “open” method that’s part of the gr_wavfile_sink::
class.

I’m open to other ideas. But this allows me to provide a convienient
“Record” feature in the apps I have that produce audio outputs, and to
conditionally have it record to a file of my choosing, or /dev/null,
depending on whether I have recording enabled or not.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On 04/15/2012 01:42 PM, Marcus D. Leech wrote:

I’m open to other ideas. But this allows me to provide a convienient
“Record” feature in the apps I have that produce audio outputs, and to
conditionally have it record to a file of my choosing, or /dev/null,
depending on whether I have recording enabled or not.

OK, so I found that the default ‘file_save’ type is willing to accept
Python expressions, so the only update is to add a callback for that
particular parameter, so that it can be changed at runtime–the
underlying C++ code supports this, it’s just that it was never exposed
in the XML.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium