I'm currently looking at pipes as a way to open an audio file in a program I am working on.
For example:
Calling pclose(bgmusic); will not work until I send a line feed to the pipe in order to stop the music as it runs on a continuous loop.Code:FILE *bgmusic bgmusic = popen(player filename.ext | aplay -f S16_LE -r 32000 -c 2", "r");
Now my question is what would be the best way to send a line feed to the pipe?