How to use ConvertTo for non-pcm formats?

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

How to use ConvertTo for non-pcm formats?

Postby ferencj » October 1st, 2006, 4:16 pm

Hi,

I'm trying to build a custom recording app with the waveaudio components. I got the basics up and running in no time. Now I want to save the wave in a non-PCM format like a-law or gsm 6.10 but don't know how.

Ideally, I'd like to provide the user with a combobox for choosing the codec and maybe another combobox for choosing the format. Much like the standard Windows soundrecorder actually. I think I have to use ConvertTo but I'm stuck at the PWaveFormatEx stuff.

How to get a list of available codecs/formats? I think the real answer is somewhere in the depths of MSDN but I was kind of hoping not having to go there... If someone could point out some example or tutorial code I'd be very happy.

cheers

Ferenc
ferencj
Member
Member
 
Posts: 2
Joined: October 1st, 2006, 9:43 am
Location: Holland

Postby Kambiz » October 2nd, 2006, 12:20 pm

Project Jedi has already converted C header files of Microsoft Audio Compression Manager (ACM) API to Delphi.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby azing010 » March 15th, 2007, 2:55 pm

hi kambiz,

im still new to delphi, id like to use another format instead of the pcm in your liveaudio demo, it says it can be done thru onformat event? how is this done?

lotsa thanks..

az
azing010
Member
Member
 
Posts: 4
Joined: March 15th, 2007, 2:08 am

Postby Kambiz » March 16th, 2007, 2:21 pm

Set PCM format to nonePCM and the on OnFormat event handler initialize a TWaveFormatEx record and pass its address to the appropriate parameter. That's all.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 5 guests

cron