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

Please discuss general Delphi programming topics here.

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

Postby hacchan » December 8th, 2004, 3:37 am

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
hacchan
Active Member
Active Member
 
Posts: 6
Joined: December 8th, 2004, 3:30 am
Location: indonesia

Postby Kambiz » December 9th, 2004, 11:36 am

In the following link you can find the wave audio format specifications:
http://www.tsp.ece.mcgill.ca/MMSP/Documents/AudioFormats/WAVE/WAVE.html
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

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

Postby hacchan » December 9th, 2004, 3:13 pm

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,
hacchan
Active Member
Active Member
 
Posts: 6
Joined: December 8th, 2004, 3:30 am
Location: indonesia

Postby Kambiz » December 10th, 2004, 8:54 am

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.
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron