• 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: MovieAudioExtractionFillBuffer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MovieAudioExtractionFillBuffer


  • Subject: Re: MovieAudioExtractionFillBuffer
  • From: Brad Ford <email@hidden>
  • Date: Wed, 7 Jan 2009 09:22:42 -0800

<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


  • Follow-Ups:
    • Re: MovieAudioExtractionFillBuffer
      • From: Tommy Braas <email@hidden>
References: 
 >MovieAudioExtractionFillBuffer (From: Tommy Braas <email@hidden>)
 >Re: MovieAudioExtractionFillBuffer (From: Brad Ford <email@hidden>)

  • Prev by Date: Question about output data streaming
  • Next by Date: Re: OpenALExample fails on PPC
  • Previous by thread: Re: MovieAudioExtractionFillBuffer
  • Next by thread: Re: MovieAudioExtractionFillBuffer
  • Index(es):
    • Date
    • Thread