• 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: looping with start offset
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: looping with start offset


  • Subject: Re: looping with start offset
  • From: Jack Nutting <email@hidden>
  • Date: Tue, 22 May 2012 09:43:51 +0200

On Tue, May 22, 2012 at 2:00 AM, Aran Mulholland
<email@hidden> wrote:
> The scheduledAudioFileRegion has an mTimeStamp property. I'm pretty
> sure that is possible to schedule multiple regions to play. So when
> starting from the middle of a loop you could schedule two regions, one
> that plays from the current track position until the end of the loop
> and another to play at the end time of the first region that plays the
> whole region and loops it.

Oh! So where I'm currently doing this:

AudioUnitSetProperty(fileUnit, kAudioUnitProperty_ScheduledFileRegion,
                                        kAudioUnitScope_Global,
0,&rgn, sizeof(rgn));

I should be able to do this?

AudioUnitSetProperty(fileUnit, kAudioUnitProperty_ScheduledFileRegion,
                                        kAudioUnitScope_Global,
0,&partialRegion, sizeof(partialRegion));
AudioUnitSetProperty(fileUnit, kAudioUnitProperty_ScheduledFileRegion,
                                        kAudioUnitScope_Global,
0,&fullLoopRegion, sizeof(fullLoopRegion));

If it works, that will be great, but it's also quite counterintuitive,
since it seems like setting the property value a second time should
make the first one go away. But maybe in the case of
kAudioUnitProperty_ScheduledFileRegion there's something else going
on? I guess I'll just experiment a bit.

>
> From my reading of the docs (aka AudioUnitProperties.h) the
> mCompletionProc is "called when it has been completely scheduled for
> reading from disk" (not when the region has completed playing) - so I
> don't think that will give you what you need.

Yeah, I figured that out some time after posting my question, oops.

--
// Jack Nutting
// email@hidden
// http://nuthole.com
// http://learncocoa.org
 _______________________________________________
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: looping with start offset
      • From: Jack Nutting <email@hidden>
References: 
 >looping with start offset (From: Jack Nutting <email@hidden>)
 >Re: looping with start offset (From: Aran Mulholland <email@hidden>)

  • Prev by Date: Re: Discussion about Learning Core Audio book
  • Next by Date: AudioConverterFillComplexBuffer - ioOutputDataPacketSize for converting aac into lpcm
  • Previous by thread: Re: looping with start offset
  • Next by thread: Re: looping with start offset
  • Index(es):
    • Date
    • Thread