DSPRelated.com
Forums

how to read use wav file in c5402

Started by sandip biranwar April 6, 2005

hi all,
i want to know that how i can read/write a wav file in CCS for c5402. i want to use that wave file in an dsp algorithm so i need to read / write and modify the data of the wav file. i'm getting the problem in reading the data of wav file as the wav file contains the header simply raeding will not do the job.
please send me your feedback that might be very usefull to me
thanks



Hi,
I think that the best way is to convert the wav file to .dat using for
example MATLAB:

Check the help of these functions:

Wavread(), wavwrite() (for wav file)
save, load (for dat file)

the dat file contains simply the audio samples, you can edit it by notepad.

CCS can read dat files
Or if you didn't use matlab befor you should write simple C program or else
which can unpack wav files from headers and write audio samples one after
another after commas. You should check the wav header structure.

Good luck.

-----Original Message-----
From: sandip biranwar [mailto:sandipbiranwar@sand...]
Sent: Wednesday, April 06, 2005 8:12 AM
To: c54x@c54x...
Subject: [c54x] how to read use wav file in c5402
hi all,
i want to know that how i can read/write a wav file in CCS for
c5402. i want to use that wave file in an dsp algorithm so i need to read /
write and modify the data of the wav file. i'm getting the problem in
reading the data of wav file as the wav file contains the header simply
raeding will not do the job.
please send me your feedback that might be very usefull to me
thanks