How wavread found out the data sample of the wav file?

Hey i just want to know how did wavread function automatically recognize/found out the data sample of the wav file? because i found out that the sample data value are not always in the same index when we stream .wav file into array. lately i'm trying to use delphi to create similar function to wavread but stuck on how to find the place of sample data of each .wav file.

Answers (1)

4 Comments

Yes sir i have, actually from the first reference you mentioned that header is not exactly same for every .wav file. i use hex editor to see through the file where the data value start variously, not exactly start at offset 44. But smartly matlab can detect wherever the data start, that's what i wanted to know how?
First it figures out which format it is (by looking at Magic Numbers). Then it looks up that format to find out where the sample rate is for that format.
@I Made: Please add links to the threads in other forums, when you cross-post a problem. Otherwise it would be a waste of time, if someone posts an answer here, which can be found at stackoverflow already. Alternative: Do not cross-post at all. Thanks.
Sory to all, but that's me too ask there T_T.. now i know that the simplest way to find the sample data is detect 'data' string then the next following it is the sample data.

Sign in to comment.

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Asked:

on 27 Apr 2013

Community Treasure Hunt

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

Start Hunting!