High CPU usage when running "soundsc" or "play"
Show older comments
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 Comments
Jan
on 8 May 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
on 8 May 2018
Which MATLAB release are you using, and which operating system?
This sounds vaguely familiar, but the release affected was somewhere around R2011a.
Stephen23
on 9 May 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
on 9 May 2018
Edited: Marius Rusu
on 9 May 2018
Accepted Answer
More Answers (0)
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!