Home My Page Projects MPTK: The Matching Pursuit ToolKit
Summary Activity Forums Tracker Lists Docs News SCM Files

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: No stdout for mpr.exe (version 0.6.1) [ Reply ]
By: David Browne on 2017-02-03 06:37
[forum:151139]
I've solved this problem by adding a condition to wavwrite that checks if the filename given for the mpr reconstruction is "-". If it is, it calls sf_open_fd as the normal sf_open cannot be used to write to stdout. However, you can only write data in raw PCM through stdout using this method (thankfully this is fine in my case).

No stdout for mpr.exe (version 0.6.1) [ Reply ]
By: David Browne on 2017-01-24 05:56
[forum:151123]

Capture.PNG (72) downloads
The documentation for the command line utilities suggest that it's possible to get stdout from the mpr function if you use a hyphen/minus as the output filename argument. I may be wrong, but this doesn't actually seem to work - I've tried to redirect the stdout from this function and never actually receive an output.

If you call the function in verbose mode (as shown in the attached image) you can see the function calls wavwrite, which returns "cannot open sound file - for writing". If you look at the source where wavwrite is defined (mp_signal.cpp), this is what wavwrite outputs when the input is null and it then returns 0.

I can't verify if this has been addressed in the latest release because there are no binaries for windows and I've had a lot of trouble getting the source to compile.