开发者

What are the possible ways to play audio from octave on a Mac?

playaudio() dies because there's no /dev开发者_如何学Go/dsp.

None of the outputs from saveaudio() in various formats seem to be playable in QuickTime or VLC.

Ideal of course would be something like playaudio(), saving a file and playing it is a work-around that's hideously sub-optimal, but better than nothing.


So, this question is ultra old, but since I just had to solve it and could not find any direct answers on the web, thought I would write something here:

First install SoX: http://sox.sourceforge.net/

Now on the terminal command line you can use:

play “sound file.wav"

...and you will hear beautiful music.

But that command does not work from within Octave. This does work:

system(‘play “sound file.wav”’);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜