• 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: Callback [was PlayFile]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Callback [was PlayFile]


  • Subject: Re: Callback [was PlayFile]
  • From: Michael Hanna <email@hidden>
  • Date: Thu, 15 Dec 2005 22:10:45 -0800

Thanks Bill, I put together this at the end of MakeSimpleGraph();

	[...............]

	OSStatus err;
	// setup the render callback
	AURenderCallbackStruct input;
	input.inputProc = MyRendererCallback;
	input.inputProcRefCon = NULL;

	err = AudioUnitSetProperty (anAU,
								kAudioUnitProperty_SetRenderCallback,
								kAudioUnitScope_Input,
								0,
								&input,
								sizeof(input));
	XThrowIfError (err, "kAudioUnitProperty_SetRenderCallback");

}

currently MyRendererCallback() does nothing:


OSStatus MyRendererCallback(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData) { return noErr; }


but I get a CAException from this setup when MakeSimpleGraph gets called:


playing file: /Users/tao/Music/iTunes/iTunes Music/Lamb/What Sound/07 Small.mp3
format: AudioStreamBasicDescription: 2 ch, 44100 Hz, '.mp3' (0x00000000) 0 bits/channel, 0 bytes/packet, 1152 frames/ packet, 0 bytes/frame
terminate called after throwing an instance of 'CAXException'


CocoaPlayFile has exited due to signal 6 (SIGABRT).

pretty certain it's my new code. Any suggestions on this?
Michael

On 15-Dec-05, at 10:48 AM, William Stewart wrote:

Have a look at the Default Output code in the SDK - it shows you have to establish the callback and feed data to it once the output unit has been started. There are also some explanations in:
/Developer/Examples/CoreAudio/Documentation/AudioUnits/


Bill

On 14/12/2005, at 10:01 PM, Michael Hanna wrote:

Hi all,

I'm assuming this call is done in a callback. How do I setup and create this callback? Pardon my naive questions.

_______________________________________________ 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: Callback [was PlayFile]
      • From: William Stewart <email@hidden>
References: 
 >MTCoreAudio (From: Michael Hanna <email@hidden>)
 >Re: MTCoreAudio (From: William Stewart <email@hidden>)
 >PlayFile [was Re: MTCoreAudio] (From: Michael Hanna <email@hidden>)
 >Re: PlayFile [was Re: MTCoreAudio] (From: William Stewart <email@hidden>)
 >Callback [was PlayFile] (From: Michael Hanna <email@hidden>)
 >Re: Callback [was PlayFile] (From: William Stewart <email@hidden>)

  • Prev by Date: Re: AUGenericView
  • Next by Date: Re: Blocked in MIDIClientCreate
  • Previous by thread: Re: Callback [was PlayFile]
  • Next by thread: Re: Callback [was PlayFile]
  • Index(es):
    • Date
    • Thread