WaveAudio and aiff format

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

WaveAudio and aiff format

Postby stfine » March 16th, 2009, 3:54 pm

Hello,

I need to load uncompressed Apple AIFF into TWave. It seems that there are no principal obstacles for this -- both formats are identical and differ by only vendor. Is it possible to have such a feature in your WaveAudio package, or I need a converter?
stfine
Active Member
Active Member
 
Posts: 12
Joined: August 1st, 2006, 7:00 am

Re: WaveAudio and aiff format

Postby Kambiz » March 16th, 2009, 8:51 pm

Could you please attach one of your AIFF files to test?
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: WaveAudio and aiff format

Postby stfine » March 16th, 2009, 9:08 pm

Here you are. Please, unzip.

Apple AIFF
44100Hz, 16-bit, Stereo
Time 0:0.456
Attachments
Clap.zip
(54.4 KiB) Downloaded 93 times
stfine
Active Member
Active Member
 
Posts: 12
Joined: August 1st, 2006, 7:00 am

Re: WaveAudio and aiff format

Postby Kambiz » March 17th, 2009, 9:03 am

The sound data of AIFF is apparently similar to WAVE, but format of chunks are different.

An external converter is needed.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: WaveAudio and aiff format

Postby stfine » March 18th, 2009, 10:47 pm

It would be veeery convenient to extend your Wave Audio package to handle aiff files too. At least, load them into TWave using, say LoadFromAIFFile().

I found something useful
http://www.koders.com/delphi/fid06EBE95 ... 8FC2F.aspx
stfine
Active Member
Active Member
 
Posts: 12
Joined: August 1st, 2006, 7:00 am

Re: WaveAudio and aiff format

Postby Kambiz » March 19th, 2009, 11:40 am

That is a good idea, thanks.

But instead of LoadFromAIFF method, I think it is better to define a converter stream class. Something line ZLib streams of DecompressorStream and CompressorStream.

Code: Select all
Stream := TAIFFReader.Create(AFileName);
Wave.LoadFromStream(Stream);
Stream.Free;

It's just an idea. Maybe it is not as easy as I think.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: WaveAudio and aiff format

Postby stfine » March 19th, 2009, 12:57 pm

I don't understand the purpose of TWaveStreamAdapter, TWaveStreamConverter, etc. What are they for?

Whenever solution you have in mind, I'm eager to assist you and participate, because I really need it.
stfine
Active Member
Active Member
 
Posts: 12
Joined: August 1st, 2006, 7:00 am

Re: WaveAudio and aiff format

Postby Kambiz » March 19th, 2009, 3:06 pm

TWaveStreamAdapter is a wrapper for any wave stream and provides access to the wave header and data.
TWaveStreamConverter is a TWaveStreamAdapter that allows on the fly conversion of wave files from one format to other.

Did you study the readme file? Also, you can find some information regarding these classes in the forum.

The bad thing is that currently I don't have time to work on AIFF conversion, sorry. I will try to include AIFF support on the next release of the package but I have no idea when it will be done.
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 3 guests

cron