how to relate .wav file read through fread and wavread??

3 Ansichten (letzte 30 Tage)
abhinibesh
abhinibesh am 27 Feb. 2015
Beantwortet: Star Strider am 27 Feb. 2015
I opened the same .wav file through fread first and wavread next.result was as follows:-
fread:- size of variabe: 240044x1 first 30 values: 82 73 70 70 164 169 3 0 87 65 86 69 102 109 116 32 16 0 0 0 1 0 1 0 64 31 0 0 128 62
wavrea:- size of variable: 120000 first 20 values: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0078 0 0 0 0.0078 0 0 0 0 0 0 -0.0078 0
Now, since through both the commands I am reading the same .wav file, therefore they should essentially be the same. Firstly the size of fread variable is double that of wavread variable plus 44 elements more. Secondly, the values in previous case are integers, while in latter case are decimals less that 1.
Can someone help me relate both these??

Antworten (1)

Star Strider
Star Strider am 27 Feb. 2015
They shouldn’t be the same. The .wav file format contains metadata that wavread strips out (and displays if you ask it to, for instance the sampling frequency), then decodes and outputs only the actual sound information. See the Wikipedia article I linked to for more information.

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by