changing from wavread to audioread

11 vues (au cours des 30 derniers jours)
Andrew Mitchell
Andrew Mitchell le 10 Fév 2016
My colleague has written a program on an older version of Matlab which involves reading in .wav file. In the older version, this would have been handled with wavread, but in R2015b it needs to be handled with audioread. I think I've mostly sorted the changes needed, but one is catching me up.
Basically, what is the audioread equivalent to:
siz = wavread(filename, 'size'

Réponses (1)

Walter Roberson
Walter Roberson le 10 Fév 2016
You can use audioinfo and extract TotalSamples and NumChannels .
But typically you just read the entire file and take size() of the data afterwards. Not always, but that is the most common approach.

Community Treasure Hunt

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

Start Hunting!

Translated by