[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Proposed update to WAV file sink
From: |
Marcus D. Leech |
Subject: |
Re: [Discuss-gnuradio] Proposed update to WAV file sink |
Date: |
Sun, 15 Apr 2012 15:18:25 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 |
On 04/15/2012 01:42 PM, Marcus D. Leech wrote:
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.
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 Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org