• 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: Re: Varispeed AU configuration with QT audio extraction?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Varispeed AU configuration with QT audio extraction?


  • Subject: Re: Re: Varispeed AU configuration with QT audio extraction?
  • From: Ray Garcia <email@hidden>
  • Date: Tue, 28 Mar 2006 10:42:17 -0600


There was some format forcing in my audio session configuration (I believe to force float32 originally) - as was suspected, the channels may be interleaved. I'll try with kAudioFormatFlagIsNonInterleaved added to the format flags. See below for the extracted section. Further recommendations?


I also realized after reading through more of the list that I may not need a varispeed unit at all. I extracted that from the graph over the weekend (i.e. only using the Output unit) - though I'm still not getting any audible output despite all assertions passing. Which leads to another question..

Can you confirm whether or not the output units have configurable output buffer size? For instance, I'd like to feed 22K worth of audio in a buffer, and the AU wants it 4K at a time, am I simply going to have to use a queue of my own construction to feed the renderproc from the extraction buffer? In the case of just the AudioDevice being fed by the quicktime session, I could match the buffer sizes and simply have a mutex-guarded transfer buffer (yeah, double buffering would be better, but proof-of-concept first..).

Background: this code is part of a "scrub bar" subsystem updating an older QT6 codebase which used the put-into-typed-handle and the old carbon asynchronous playback audio APIs. The cost of the QT6 code execution ballooned with QT7 such that the response time was unacceptable. Cost of execution tables might be nice to have in the documentation.

On the kudos side, I did want to thank Apple for making the intel transition so smooth - our application, which integrates QT with a touch of Carbon, borderline abuses the Cocoa text subsystem, and uses OpenGL for real-time video compositing, made the transition to Universal with 5 lines of code added (an #ifdef for word order on OpenGL textures). Our jaws hit the floor.

Thanks for the info!

--------8<---------

OSErr err = MovieAudioExtractionGetProperty(ausess,
kQTPropertyClass_MovieAudioExtraction_Audio,
kQTMovieAudioExtractionAudioPropertyID_AudioStreamBasicDescription,
sizeof(asbd), &asbd, nil);
QTCHK("MovieAudioExtractionGetProperty (ASBD)");



...

    asbd.mFormatFlags =   kAudioFormatFlagIsFloat
                        | kAudioFormatFlagIsPacked
                        | kAudioFormatFlagsNativeEndian;
    asbd.mBitsPerChannel = sizeof (Float32) * 8;
    asbd.mBytesPerFrame = sizeof(Float32) * asbd.mChannelsPerFrame;
    asbd.mBytesPerPacket = asbd.mBytesPerFrame;

// Set the new audio extraction ASBD
err = MovieAudioExtractionSetProperty(ausess,
kQTPropertyClass_MovieAudioExtraction_Audio,
kQTMovieAudioExtractionAudioPropertyID_AudioStreamBasicDescription,
sizeof (asbd), &asbd);
QTCHK("MovieAudioExtractionSetProperty (ASBD)");



_______________________________________________ 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: Varispeed AU configuration with QT audio extraction?
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Another approach to root user?
  • Next by Date: Odd Cocoa user interface problem with GarageBand.
  • Previous by thread: Re: Varispeed AU configuration with QT audio extraction?
  • Next by thread: Re: Varispeed AU configuration with QT audio extraction?
  • Index(es):
    • Date
    • Thread