FileSink module on target

4 posts / 0 new
Last post
EJing
Offline
Last seen: 1 week 2 days ago
Joined: 12/05/2016 - 9:47pm
FileSink module on target

Can FileSink keep up with real-time processing of audio on target (linux running on Intel, for example) or it could cause the audio thread to miss its timing?  Or it’s only meant to be used in batch processing mode?

 

Also,  from DSPC, "The FileSink module writes the data in the module's process function.  It writes it block by block.  The file is opened in the module's constructor function and then closed in the set function.  The framework calls the set function with a mask of all zeros indicating that the destroy function was called."

 

What’s the exact command for the set function with mask of all zeros?

 

Thanks.

Axel Nilsson
Offline
Last seen: 2 days 18 hours ago
Joined: 12/19/2016 - 2:02pm

Hi,

 

The file sink module is doing File IO on your system, which can be expensive. Though for any design that is not otherwise computationally heavy it should be able to keep up.

 

The note from DSPC just means that when your design starts running it opens the file, and when the design stops running it closes it. This is all taken care of behind the scenes. 

 

-Axel

EJing
Offline
Last seen: 1 week 2 days ago
Joined: 12/05/2016 - 9:47pm

During unit testing, I use multiple FileSinks to log data for analysis.  For final design running on target, I would like to turn all of the FileSinks off (inactive mode).  Is there a way for me to find all FileSink modules and change state to them all?  Can it be scripted?  Thanks.

DSPC_Peaston
Offline
Last seen: 2 days 20 hours ago
Joined: 10/04/2016 - 4:16pm

I believe this script should do what you need.


Note that it is a .m file, so change the extension once you download. This script in specific looks for all modules of class 'Sink' and sets them to 'muted'. It should be straightforward what needs to be changed, but let us know if you run into issues with it. 

Cheers!