• 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: Audiograph fileRegion.mCompletionProc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Audiograph fileRegion.mCompletionProc


  • Subject: Re: Audiograph fileRegion.mCompletionProc
  • From: Daniel Tapie <email@hidden>
  • Date: Mon, 23 Jul 2012 16:46:24 +0200

Hi Robert,

Not sure this is the best thing to do, but what we actually do is start a timer when the completion proc is called, so that it starts checking for the actual playback position and when it reaches the end, we know the playout is over.

One more thing: apparentl the AU file player component does not work in an Sandboxed environment. We filed a bug report on this, but I thought you'd like to know.

Hope this helps,


Daniel Tapie
Softon Media Services

On 23 Jul 2012, at 16:38, Robert Carroll <email@hidden> wrote:

Hi,

With an audiograph fileplayer, when does the audiofileregion.mCompletionProc fire? Is this documented anywhere?

I assumed this meant once the fileregion has been played, but it seems to occur when it is read into memory.

        memset (&fileRegion.mTimeStamp, 0, sizeof(fileRegion.mTimeStamp));
        fileRegion.mTimeStamp.mFlags = kAudioTimeStampSampleTimeValid;
        fileRegion.mTimeStamp.mSampleTime = 0;
        fileRegion.mCompletionProc = completionListenerProc;

        fileRegion.mCompletionProcUserData = NULL;

        fileRegion.mAudioFile = inputFile;

         fileRegion.mLoopCount = 0; //do not loop
        fileRegion.mStartFrame = 0;
        fileRegion.mFramesToPlay = (UInt32)44100;

void completionListenerProc(
//OSStatus completionListenerProc(
                            void * inRefCon,
                          AudioUnit ci,
                          AudioUnitPropertyID inID,
                          AudioUnitScope inScope,
                          AudioUnitElement inElement)
{

    NSLog(@"completionListenerProc: fileplayer complete!");

    //return noErr;
}

 _______________________________________________
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: Audiograph fileRegion.mCompletionProc
      • From: Aran Mulholland <email@hidden>
References: 
 >Audiograph fileRegion.mCompletionProc (From: Robert Carroll <email@hidden>)

  • Prev by Date: Audiograph fileRegion.mCompletionProc
  • Next by Date: MIDIClientCreate returns kMIDIServerStartErr -10839
  • Previous by thread: Audiograph fileRegion.mCompletionProc
  • Next by thread: Re: Audiograph fileRegion.mCompletionProc
  • Index(es):
    • Date
    • Thread