IC-7410 Rig Control with http (6)

This is a real waterfall.

By the way, if you get an error message, undefined reference to ‘alloca’, with your gcc, the following line may help.

#include <alloca.h>

If you are using “stdout” instead of “stderr”, you may need to specify the mode for file buffering.

% sprig_audio_only /dev/ttyUSB0 hw:2,0 |& node index.js
% sprig_audio_only /dev/ttyUSB0 hw:2,0 |  node index.js

sprig_audio_only.c

#include <stdio.h>
int main () {
 setvbuf(stdout, NULL, _IOLBF, 0); // line buffering mode
//
 for(int i=0;i<512<i++) {
  fprintf(stdout, "%1d", audio_signal_ffted[i]);
 }
 fprintf(stdout,"\n");
 fflush(stdout); // this will also do with full buffering mode
//
}

Leave a Reply

Your email address will not be published. Required fields are marked *