• 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: multichannel mixer render callback problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multichannel mixer render callback problems


  • Subject: Re: multichannel mixer render callback problems
  • From: uɐıʇəqɐz pnoqɥɒɯ <email@hidden>
  • Date: Fri, 30 Jul 2010 10:20:32 -0700

One render callback is all you need.  You'll need a way to track which loop is being serviced by the callback, and you can do something like this:

if (!userData->mPlaying[inBusNumber]) {
SilenceData(ioData);
*ioActionFlags |= kAudioUnitRenderAction_OutputIsSilence;
return noErr;
}
else {
AudioSampleType *in = userData->soundBuffer[inBusNumber]->data;
AudioSampleType *out = (AudioSampleType *)ioData->mBuffers[0].mData; 
...
etc.


On Jul 30, 2010, at 8:11 AM, Charlie Cullen wrote:

Hi,

I am having major(!) problems with render callbacks in a multichannel mixer application.

Basically, I intend to loop audio files of different lengths and so I had looked at the iPhone MixerEQGraph example and extended it to take in 8 audio files on 8 seperate busses.

The problem lies in setting up a functioning render callback for each bus of a different loop length.

Say I have 4 busses with 4 bar loops, 2 with 8 bar loops and another 2 with 16 bar loops. If I want them all to playback fully I think I need seperate render input functions for all 3 cases, to accommodate the different file lengths.

Curiously, I can get seperate render callbacks to function for each loop set if I create seperate SourceAudioBufferData structs for each loopset and then attach these to the mixer but the render input callbacks still do not work....

I have now tried implementing this in a number of different ways, but the best I can get it truncated loops of 4 bars for all busses!

I have looked at all the examples I can find, Apple WDC podcasts and trawled the API's- I know I'm missing something fairly fundamental :-)

Has anyone encountered this problem?

I would greatly appreciated any help or advice that anyone may have.

Thanks in advance,

Charlie
 _______________________________________________
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

References: 
 >multichannel mixer render callback problems (From: Charlie Cullen <email@hidden>)

  • Prev by Date: Re: How do I release multiple instance of AVAudioPlayer
  • Next by Date: Re: Recommended way to classify AU categories on the UI?
  • Previous by thread: Re: multichannel mixer render callback problems
  • Next by thread: Formatting a time signature for MusicPlayer
  • Index(es):
    • Date
    • Thread