Page 1 of 1

HOw to read wave data chunk (in PCM format)?

PostPosted: December 8th, 2004, 3:37 am
by hacchan
Hi, I'm working on an essay now.
It's about reading a wave file (only PCM 8bit 44.100).
I'm using Wave Audio Package v1.60 downloaded from here.
I've been able to record a sound, but now i have a problem in reading the file structure and data (i'm weak in reading pointer :P ).
I wonder in what type of data a wave file is stored and how to read them(bitmap store the RGB of pixels, but in wave file...?)
I'd be very thankful if somebody could help me.
Thanks a lot.

Regards,
Handoko

PostPosted: December 9th, 2004, 11:36 am
by Kambiz
In the following link you can find the wave audio format specifications:
http://www.tsp.ece.mcgill.ca/MMSP/Documents/AudioFormats/WAVE/WAVE.html

still a problem in retrieving 'data chunk' of a wave file

PostPosted: December 9th, 2004, 3:13 pm
by hacchan
Dear Kambiz : Thanks for the site. It's pretty useful.
But I still got problem in retrieving the 'data chunk' cos' it's stored in pointer data.
I've read the Wave.pas in WaveAudioPackage but still can't got the idea.
Maybe you could help me creating a programme that can retrieve the 'data chunk' of a wave file and output as a string? (just output them in memo or stringgrid).
I just need to read the data, no need to rebuild them or playback the wave file.
Anyone could help?
Thanks b4..

Regards,

PostPosted: December 10th, 2004, 8:54 am
by Kambiz
If you spend a little time and study TWave class (wavestorage.pas), you will find out how to interpret the wave data.

In the other hand, if you are weak in using pointers, it's time to get rid of this weakness. For optimized coding, you should get advantage of using pointers. It's not as difficult as you think.