Page 1 of 1
WaveAudio and aiff format

Posted:
March 16th, 2009, 3:54 pm
by stfine
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?
Re: WaveAudio and aiff format

Posted:
March 16th, 2009, 8:51 pm
by Kambiz
Could you please attach one of your AIFF files to test?
Re: WaveAudio and aiff format

Posted:
March 16th, 2009, 9:08 pm
by stfine
Here you are. Please, unzip.
Apple AIFF
44100Hz, 16-bit, Stereo
Time 0:0.456
Re: WaveAudio and aiff format

Posted:
March 17th, 2009, 9:03 am
by Kambiz
The sound data of AIFF is apparently similar to WAVE, but format of chunks are different.
An external converter is needed.
Re: WaveAudio and aiff format

Posted:
March 18th, 2009, 10:47 pm
by stfine
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
Re: WaveAudio and aiff format

Posted:
March 19th, 2009, 11:40 am
by Kambiz
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.
Re: WaveAudio and aiff format

Posted:
March 19th, 2009, 12:57 pm
by stfine
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.
Re: WaveAudio and aiff format

Posted:
March 19th, 2009, 3:06 pm
by Kambiz
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.