简体   繁体   中英

playaudio() in Octave

I'm trying to run the following line to play a signal:

>> playaudio(sig);

But the terminal returns:

>> sh: cannot create /dev/dsp: Permission denied

How can I correct this? Thanks

I'm running Ubuntu 11.10.

playaudio may be broken It's worth reading the default implementation of playsound (version 3.6.2):

Have a look at this link How do I play a sound in Octave?

Try starting octave with superuser rights

sudo octave

Then try to play it again

>> playaudio(signal)

If this doesn't work, try installing the package named octave-audio (might also need to install a package named sox).

playaudio was deprecated in Octave 4.0 and will be removed in 4.4. Use audioplayer instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM