High CPU usage when running "soundsc" or "play"
Afficher commentaires plus anciens
Hi,
I am trying to play simple beep sounds of various lengths and whenever I run "soundsc" or "play" the CPU usage goes high up. Does anybody known why is this the case and if there is anything that can be done to keep the CPU usage low?
Kind regards, Marius
4 commentaires
Jan
le 8 Mai 2018
Please post your code. It is hard to guess what's going on based on the description as text. Of course I could try to write an example of my own to try to reproduce your observations. But you have the code already, such that it is cheaper, if you post it. Which Matlab and OS are you using?
Walter Roberson
le 8 Mai 2018
Which MATLAB release are you using, and which operating system?
This sounds vaguely familiar, but the release affected was somewhere around R2011a.
Stephen23
le 9 Mai 2018
Hi,
Thanks for your replies.
I am running Windows 7 Professional with Service Pack 1 on a i5-3210M CPU @2.5Ghz (laptop) and Matlab 2018a. I open up Matlab, paste this code in the command window, hit enter and then monitor the CPU usage.
[y,Fs] = audioread('sounds\beep-1378.125Hz-30s.wav');
player = audioplayer(y, Fs);
play(player);
The sound I am playing is a triangle shape stored as a .wav file and is 30 seconds long. The CPU usage is quite high for the whole duration of the sound playing. Once the sound stops the CPU usage goes down.

Kind regards, Marius
Marius Rusu
le 9 Mai 2018
Modifié(e) : Marius Rusu
le 9 Mai 2018
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Audio and Video Data dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
