Re: MovieAudioExtractionFillBuffer
Re: MovieAudioExtractionFillBuffer
- Subject: Re: MovieAudioExtractionFillBuffer
- From: Tommy Braas <email@hidden>
- Date: Thu, 8 Jan 2009 08:52:13 +1100
Haha of course... so obvious once you see it...
Tightened checks indeed... which I applaud!
Thanks for your help Brad.
Cheers,
\tommy
__________________________________________________________
Tommy Braas
Deep Sea Software
<mailto:email@hidden>
<http://www.deepseasoftware.com>
"Have Code, Will Travel" -- Mac OS X and Java Specialists
__________________________________________________________
This message is intended only for the personal and confidential use of
the designated recipient(s) named above. If you are not the intended
recipient of this message you are hereby notified that any review,
dissemination, distribution or copying of this message is strictly
prohibited. This communication is for information purposes only and
should not be regarded as an offer to sell or as a solicitation of an
offer to buy any product, an official confirmation of any transaction,
or as an official statement of Deep Sea Software. Email transmission
cannot be guaranteed to be secure or error-free. Therefore, we do not
represent that this information is complete or accurate and it should
not be relied upon as such. All information is subject to change
without notice.
On Jan 8, 2009, at 4:22 AM, Brad Ford wrote:
<SNIP>
...
</code>
The "outputASBD" is retreived by:
<code>
osStatus = MovieAudioExtractionGetProperty(sessID,
kQTPropertyClass_MovieAudioExtraction_Audio,
kQTMovieAudioExtractionAudioPropertyID_AudioStreamBasicDescription,
sizeof(*outputASBD),
outputASBD,
nil);
</code>
Which is then massaged a little to provide us with the format we
need in the component that consumes the audio track:
<code>
outputASBD->mFormatFlags = kAudioFormatFlagsNativeFloatPacked;
outputASBD->mBitsPerChannel = sizeof(Float32) * 8;
outputASBD->mBytesPerFrame = sizeof(Float32) * numChannels;
</code>
More specifically, the error I am seeing (console.log output from
Quicktime) is:
Failed to create extraction AudioConverter err= ffffffce
InitializeAudioExtraction err -50 creating AudioConverter
Maybe that can provide more of a hint to where the problem might lie.
-50 is paramErr when calling AudioConverterNew, which means one of
the asbd's is wrong. I'm betting it's yours. ;-)
kAudioFormatFlagsNativeFloatPacked doesn't include the non-
interleaved flag, so you're asking for interleaved Float32. It
looks like you're filling out mBitsPerChannel and mBytesPerFrame
correctly, but you're neglecting to set mBytesPerPacket to the new
mBytesPerFrame value. My guess is that CoreAudio's parameter
checking for PCM got stricter in 10.5.6. If that's the case, then
the bug has always been there in your code, but you were getting
away with it up to now.
-Brad Ford
QuickTime Engineering
_______________________________________________
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