• 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
How do you pause, stop and reset an AUFilePlayer in IOS5?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do you pause, stop and reset an AUFilePlayer in IOS5?


  • Subject: How do you pause, stop and reset an AUFilePlayer in IOS5?
  • From: "Beleg Da'Bear" <email@hidden>
  • Date: Wed, 18 Jul 2012 14:06:21 -0700 (PDT)

I am working with core audio using an AUFilePlayer to load a few mp3s into a mixer unit, everything plays great however I am unable to pause the music or rewind the music back to the start. I tried Starting and stopping the AudioGraph, but once the playback is stopped, I can't get it to restart. I also tried using AudioUnitSetProperty to set the file playback to 0
i.e something along these lines:
        ScheduledAudioFileRegion rgn;
        memset (&rgn.mTimeStamp, 0, sizeof(rgn.mTimeStamp));
        rgn.mTimeStamp.mFlags = kAudioTimeStampSampleTimeValid;
        rgn.mTimeStamp.mSampleTime = 0;
        rgn.mCompletionProc = NULL;
        rgn.mCompletionProcUserData = NULL;
        rgn.mAudioFile = inputFile;
        rgn.mLoopCount = 1;
        rgn.mStartFrame = 0;

        rgn.mFramesToPlay = nPackets * inputFormat.mFramesPerPacket;

        AudioUnitSetProperty(fileUnit, kAudioUnitProperty_ScheduledFileRegion,
                             kAudioUnitScope_Global, 0,&rgn, sizeof(rgn));
Any suggestions?
 _______________________________________________
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: How do you pause, stop and reset an AUFilePlayer in IOS5?
      • From: Aran Mulholland <email@hidden>
  • Prev by Date: Re: What's involved streaming audio to disk as mp3 in iOS
  • Next by Date: Re: How do you pause, stop and reset an AUFilePlayer in IOS5?
  • Previous by thread: AU with CocoaView for 64-bit and CarbonView for 32-bit
  • Next by thread: Re: How do you pause, stop and reset an AUFilePlayer in IOS5?
  • Index(es):
    • Date
    • Thread