I currently have written a code which takes in a raw file as input and does some audio processing and writes it to another different raw file.
The way I am currently inputting is
.\my_code_binary < input.raw > output.raw
as you can see, I am making the input.raw as stdin and output.raw as stdout for the execution my program.
fread(tmp, sizeof(short), channels * size_of_frame, stdin); // the way I am using the input.raw fwrite(tmp, sizeof(short), channels * FRAME_SIZE, stdout); // the way I am using the output.raw
Now I want to make my program run real-time, as in, take my mic input as stdin and mic output as stdout. Any resources or code snippets will help me out, I am a beginner at audio processing in C.
I am using a Raspberry Pi 4