Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

function sound() changed behavior on matlab 2013a Mac

2 Ansichten (letzte 30 Tage)
yonghao
yonghao am 28 Jul. 2013
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hello, I am using Matlab sound function to play demo sound. My code have a several sound functions one by one such as:
...
sound(sample1,fs1);
sound(sample2,fs2);
sound(sample3,fs3);
...
In previous matlab version, the sound played one by one from sample1 to sample3. but since we upgraded to 2013a on MAC OS X, when run the script, the matlab seems mixed them together or try to play them simultaneously via different processes. This make the results unpredictable. Certainly, you can add pause() or select one line by line and do evaluate by selection. But that is rather trouble.
Any suggestions to this will be appreciated.

Antworten (1)

Shashank Prasanna
Shashank Prasanna am 28 Jul. 2013
Bearbeitet: Shashank Prasanna am 28 Jul. 2013
The sound function in R2013a now returns immediately without blocking. You can use playblocking instead.
This is captured in the release notes here:

Diese Frage ist geschlossen.

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by