Passing a URL to a specific piece of example code

2019-09-19 14:57发布

I don't know if it is legal on SOF to access such a specific question, but here I go:

I've found this wonderful piece of code which takes all the samples from a WAV file and passes it into an array.

The code compiles, but I can't seem to figure out where to pass the argument of where the file is and what its name is.

Any help?

PS If this code does what it says it does, I think it could be useful to a lot of people.

Thanks!

标签: c audio wav
2条回答
Ridiculous、
2楼-- · 2019-09-19 15:10

If you look at the code it's reading from stdin (and it even says in the description above the code: "It reads from stdin"). Evidently it's designed to be used as a command line tool (or "filter") which can be piped with other tools, or standalone using I/O redirection.

查看更多
神经病院院长
3楼-- · 2019-09-19 15:26

You should be able to pipe output from wget or curl.

wget -O - http://www.whatever.com/somefile.wav | yourpieceofcode

查看更多
登录 后发表回答