John:
I'm not sure what's going on with your particular app and
GetMediaSample(), etc. (Note that it is valid for some AAC packets
to be very small, particularly when they encode silence.) However,
from what you describe, it sounds like you should be using
MovieAudioExtraction APIs instead, to extract the audio samples from
the movie in whatever PCM format is most convenient for you. See the
QTAudioExtractionPanel example code on the developer website.
Daniel Steinberg
QuickTime Engineering
At 12:57 AM -0400 10/26/05, john wrote:
Hi,
I am having a problem with AAC and Lossless files, but other types
(AIFF, MP3, etc.) work just fine.
The problem I'm having is that after reading in the file, converting
it to 32-bit float, writing it to a new file (using CoreAudio), and
playing it back, small segments of the audio file are missing. There
are no gaps, so it sounds sort-of like a CD that isn't tracking very
well. It also appears to be mostly at the very beginning and end of
the file.
When I analyse my sound converter fill buffer proc, I notice the
call to GetMediaSample() returns weird results. For instance:
At the beginning/end of reading an AAC file, I'll get 21 samples
returned but only 147 bytes returned. Compared to the middle of the
file I'll have 1 sample returned with 358 (actual byte count varies
a little bit) bytes returned. Or 2 samples with 714 bytes. It is as
if GetMediaSample() did read and convert but the byte count is
completely out of sync.
Also, it's reading in tiny sizes (300 bytes or less???). My
converter proc is called 9669 times for a 3.6MB file. Compared to
161 for a 4.6MB MP3 file or 483 times for a 40MB aiff file.
I have based my code on the ConvertMovieSndTrack sample code.
Any ideas? Thanks.
-- John
_______________________________________________
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