MATLAB Answers

I Made

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

Asked by I Made
on 27 Apr 2013

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.


Log in to comment.


1 Answer

Answer by Jan Simon
on 27 Apr 2013


Show 1 older comment

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.

Log in to comment.

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today