• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: coreaudio/quicktime mp3 decoder equivalent?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >coreaudio/quicktime mp3 decoder equivalent? (From: Hendrik Schreiber <email@hidden>)
 >Re: coreaudio/quicktime mp3 decoder equivalent? (From: William Stewart <email@hidden>)

  • Prev by Date: HandleMidiEvent not firing
  • Next by Date: audio queue play example - some notes
  • Previous by thread: Re: coreaudio/quicktime mp3 decoder equivalent?
  • Next by thread: Mixing line-in + internal audio
  • Index(es):
    • Date
    • Thread