Re: coreaudio/quicktime mp3 decoder equivalent?
Re: coreaudio/quicktime mp3 decoder equivalent?
- Subject: Re: coreaudio/quicktime mp3 decoder equivalent?
- From: Hendrik Schreiber <email@hidden>
- Date: Tue, 15 Jul 2008 11:36:38 -0400
On Jul 14, 2008, at 13:53 , William Stewart wrote:
Its the same decoder in both places.
If you do (on Leopard) afconvert Your/file.mp3 /tmp/file.wav -d
LEI16 -f WAVE -v
then you will have a completely clean MP3 file decoded (this is the
same as the ExtAF version) - if you compare the result of that with
your two current versions, then the one that it is not identical
too is the one that is doing something more to the audio than just
decoding it.
Turns out that the QuickTime version is not the same (but very
similar) as the result from decoding with afconvert.
(I used afconvert on Leopard, but QuickTime on Tiger, but I guess
that shouldn't matter)
What's puzzling to me, is that I really don't do anything special in
my QuickTime code. Here's the abbreviated version:
waveExport = OpenDefaultComponent(MovieExportType,
kQTFileTypeWave);
desc = (SoundDescriptionHandle)NewHandleClear(sizeof
(SoundDescription));
(**desc).descSize = sizeof(SoundDescription);
(**desc).sampleSize = 16;
(**desc).sampleRate = 44100L << 16;
(**desc).dataFormat = k16BitLittleEndianFormat;
(**desc).numChannels = 2;
MovieExportSetSampleDescription(waveExport,
(SampleDescriptionHandle)desc, SoundMediaType);
getDataRef(...); // this gets the dataref we want to write the
result to
openMovie(...); // this opens the mp3 file as a movie
MovieExportToDataRef(waveExport, dataRef, dataRefType, movie,
NULL, 0, 0);
The input file for this is a stereo mp3 file sampled at 44100Hz, so
we don't even need to convert/resample anything.
I'd appreciate, if anybody gave me any pointers to why the QuickTime
result is different than the CoreAudio result.
Thanks,
-hendrik
PS: I know this isn't the QuickTime list, but since I started posting
here, I thought I give it a shot before I take it there.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden