• 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
AudioUnit RenderCallback Scope Issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioUnit RenderCallback Scope Issues


  • Subject: AudioUnit RenderCallback Scope Issues
  • From: Daniel Elliott <email@hidden>
  • Date: Tue, 12 Aug 2008 10:02:42 +0000 (GMT)

Hi

I'm getting issued with my rendercallback function that I'm setting for an audiounit in an audio processing graph.

OSStatus myRenderCallback( void * inRefCon, //Sets up Rendercallbacks for all the input nodes on the graph
AudioUnitRenderActionFlags * ioActionFlags,
const AudioTimeStamp * inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList* ioData ){

ioData->mBuffers[0].mData = myBuffer

}

I have set up all the AURenderCallbackStructs and set up the functions but when I try to set ioData->mBuffer[0].mData to my custom Buffer which will have my audio data, I get the 'error, first declared in this function' thingy.

I am then setting the top node in the graph to take my AUrendercallback with

AUGraphSetNodeInputCallback (myGraph, myNode, 0, myAURenderCallbackStruct);

The AudioUnit programming guide says..

"The host must explicitly set the stream format for the audio unit’s input as a prerequisite to making
the connection. The audio unit calls the callback in the host when it’s ready for more audio data.
In contrast, for an audio processing graph connection, the upstream audio unit supplies the render
callback. In a graph, the upstream audio unit also sets the downstream audio unit’s input stream
format."

Does this mean that the audiounit 'supplies' a rendercallback that can't see my object's variables?

If I do a AudioUnitSetProperty function with the rendercallback flag, will the callback then be supplied by 'me'(the host)? then will it see my variables?

I even tried writing the whole thing in c++, using a class instead of the objective c @implementation, but that brought a whole load of other data type mismatching errors.

I'm thinking that maybe xcode is using gcc to compile and it's being treated as straight c. Do I have to set it to g++ so that it gets compiled as objective c++ and then my render callback will be able to see my object's variables?

Send instant messages to your online friends http://uk.messenger.yahoo.com
 _______________________________________________
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: AudioUnit RenderCallback Scope Issues
      • From: Peter Rebholz <email@hidden>
  • Prev by Date: Re: CoreAudio on the iPhone (The stark loneliness of CoreAudioTypes.h)
  • Next by Date: Re: AudioUnit RenderCallback Scope Issues
  • Previous by thread: Problem with audio queues
  • Next by thread: Re: AudioUnit RenderCallback Scope Issues
  • Index(es):
    • Date
    • Thread