Passing a URL to a specific piece of example code which extracts samples from a WAV file

空扰寡人 提交于 2019-12-12 02:09:50

问题


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!


回答1:


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.




回答2:


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

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



来源:https://stackoverflow.com/questions/4946916/passing-a-url-to-a-specific-piece-of-example-code-which-extracts-samples-from-a

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!