If QT 7 is not available (there are ways to check this: a really
old way is Gestalt(gestaltQuickTimeVersion, &version), but there
may be more modern ways as well), you can still use your old
SoundConverter code, but only if the SoundDescriptionV2 you have
received was overkill, and the audio is actually not hi-res, and
could have been described with a SoundDescriptionV1.
You can see if this is the case by converting the v2 description
to a v1 description with QTSoundDescriptionConvert() (found in
Movies.h, with a bunch of documentation). If you are successful,
carry on with your old code, using the newly created V1
description. If you are not successful, the audio was hi-res, and
you will need QT7, or some new code that does what your old code
does, but can deal with V2 descriptions, and uses AudioConverter
instead of SoundConverter.
And if QT7 is there, of course, just do the audio extraction thing
for everything.
Greg
On Jun 22, 2006, at 5:53 AM, Alexander von Below wrote:
On 22.06.2006, at 08:24, Greg Chapman wrote:
On Jun 21, 2006, at 11:07 PM, Geoff Brown wrote:
That said, GetMediaSampleDescription should return the lowest
possible version and we will fix this in a future release.
Mmmm, no. GetMediaSampleDescription returns whatever is in the
file. If you see a v2 SoundDescription it's because that's what
is truly there. And you need to either handle it, or reject it
as not handled by your program.
....
That reminds me, you should be aware that SoundConverter cannot
handle this new "hi-res" audio (channels > 2, or sampleRate >
64kHz). You should either switch to MovieAudioExtraction (which
will handle _all_ of this for you, including understanding the
various sample descriptions, decompression of samples, mixing of
multiple tracks), or do your sound conversions with the
AudioConverter APIs found in the AudioToolbox framework.
Greg, Geoff,
thanks a lot for your answers.
The good news is, I have working QuickTime 7
(MovieAudioExtraction) code to do this, and I even have
AudioToolbox code to do the conversion(1)
I would appreciate a pointer to the "best practice" of
determining if QuickTime 7 APIs are available on a 10.3 system (2)
Other than that, it seems that I am caught between a rock and a
hard place, and I am very, very frustrated because whenever I
think I found a solution, something new jumps at me. All I want
is to decode the files which "the user can play in iTunes" (m4p
excluded, of course) on OS X 10.3 (2) with QuickTime 6. The files
can be played even with OS X 10.2 and QT 6, however as to
conversion:
- SoundConverter will not work (if I understood you correctly)
- AudioToolbox does not read m4a files on 10.3 anyway.
Very clearly, users will blame us for not being able to read
these file.
If Apple would document the known limitations and bugs of these
APIs, it would have saved me days and days of trials and
tribulations.
So, is there any method how I can convert "all the files that
iTunes plays on this computer" on OS X 10.3? Are there any other
monsters hiding in the dark?
I would like to add that The Lists have been very, very helpful.
Without the support of the mailing list, I would have already
lost my mind entirely.
Alex
(1) Regular readers of the QuickTime and CoreAudio Lists may have
followed my ordeal
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden
This email sent to email@hidden