Force quitting sound(y)
1 次查看(过去 30 天)
显示 更早的评论
Hello,
How can I force quit the sound function if I accidentally played a 44100 hz file with the default hz?
Control - C doesn't seem to work and the only way is through the ctrl-alt-del
Thanks in advance
0 个评论
采纳的回答
Walter Roberson
2012-1-18
Yes, ctrl-alt-del if you are in MS Windows. control-c is not active until the hard-coded routine returns.
Might I suggest that the lesson here is not to use sound()? You can use http://www.mathworks.com/help/techdoc/ref/audioplayer.html
4 个评论
Walter Roberson
2012-1-18
audioplayer has a "stop" method. sound() does not. If being able to cancel the playing is important, then sound() is out of the running.
Daniel Shub
2012-1-18
For the current question I agree that the flexibility of audioplayer is beneficial. My reaction was to the "the lesson here is not to use sound()" which I read as suggesting audioplayer was always as good as or better than sound.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!