• 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: AU "offline" processing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AU "offline" processing


  • Subject: Re: AU "offline" processing
  • From: Alberto Ricci <email@hidden>
  • Date: Fri, 31 Jan 2003 15:38:34 +0100

While writing the previous message, I thought an alternative to a "skip read head to position x" callback might be a callback that provides random access to future and past samples.

I am wondering whether it would be easier or harder to implement non-causal effects with one type of callback or the other. It probably depends on the specific effect.
There is an intrinsic difference between the two methods because one of them causes the read head to move for all other AUs as well, whereas the random access one does not have any influence outside of the scope of the AU.

Take a Reverse effect, for instance.
You would probably do it this way:

Process(inSampleOffset, inNumberOfSamplesToProcess, inSampleBuffer)
{
hostCallbacks->GetSamples(totalLength-inSampleOffset-inNumberOfSamplesToProcess, inNumberOfSamplesToProcess);
reverse the samples
output the reversed samples
}

so the inNumberOfSamplesToProcess parameter would only tell the AU how many samples to output, and the input sample buffer would be unused since the AU gets its samples through the callback.

With a "skip read head" type of callback, on the other hand, you would first tell the read head to skip to the end of the selection minus the number of samples received by Process(), and return without processing any samples.
The next time Process() is called, the AU will be passed a buffer starting at the specified position.
However, the number of samples passed to the Process() routine may differ from time to time! Therefore, if we set the read head to position (length-offset-bufferSize), when we are later passed a different buffer size we might need to do various adjustments.
It is not really straightforward.

Any thoughts?
Alberto.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: AU "offline" processing
  • Next by Date: Re: AU "offline" processing
  • Previous by thread: Re: AU "offline" processing
  • Next by thread: Re: AU "offline" processing
  • Index(es):
    • Date
    • Thread