audiowrite.m needs a long time to save

Hi!
I think this is a bug report but probably for Windows10 and a dirty fix.
When I try to write a lot of *.wav in short succession, at one point audiowrite needs a long time to save the files.
I narrowed the error down to the subfunction 'filepath.Writeable' in audiowrite.m . So if you desperate (like me) you can comment out the line
% if ~filepath.Writeable
% error(message('MATLAB:audiovideo:audiowrite:fileNotWritable', filename));
% end
(Matlab 2020) and hope for the best.
Greetings,
Ewald

3 Comments

Gaurav Garg
Gaurav Garg on 25 Jan 2021
Edited: Gaurav Garg on 25 Jan 2021
Hi Ewald,
Can you point out what file are you writing and share the code as well (if fine with you), because I wasn't able to reproduce the issue?
That would help us gather more understanding about the bug and give you a proper solution for the problem.
Hi Ewald,
There is a question I have:
for i=1:100
....
signalfolder=strcat('C:\Users\....);
mkdir(signalfolder);
.....
end
What is the need to make directory 'C:\Users\...'? Can't you directly write audio to the needed file, which I think is 'RandSignal.wav' in your case?
The reason is that each signal needs its own folder. I have no choice here.

Sign in to comment.

Answers (1)

Hi Ewald,
Don't know whether I ran into the same issue because of the same reason or not, but in my case the folder in which I was trying to write was read-only. Just edit windows properties in that folder and remove "read-only".
Hope it helps! ;)

Asked:

on 22 Jan 2021

Community Treasure Hunt

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

Start Hunting!