• 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
CAAudioUnit fails Initialization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CAAudioUnit fails Initialization


  • Subject: CAAudioUnit fails Initialization
  • From: Craig Hopson <email@hidden>
  • Date: Wed, 26 Apr 2006 16:12:16 -0600

Hopefully this is an easy one... ...with apologies because it probably has been asked before...

I am trying to use a matrix mixer as follows:

	***************** in the header *******************
	CAAudioUnit 				mMixer;
	CAStreamBasicDescription*	mStreamDesc;

	****************************************************

	ComponentResult result = noErr;
	UInt32 size;
	bool canDo;
	int numInputChans = 2;
	int numOutputChans = 1;


// create the stream description
mStreamDesc = new CAStreamBasicDescription();
mStreamDesc->SetCanonical( kNumberChannels, false ); // kNumberChannels == 2
mStreamDesc->mSampleRate = inSampleRate;


// load our mixer unit
CAComponentDescription desc = CAComponentDescription( kAudioUnitType_Mixer,
kAudioUnitSubType_MatrixMixer,
kAudioUnitManufacturer_Apple );
CAComponent mixerComp( desc );
XThrowIf( !mixerComp.IsValid(), 0, "Failed to load Mixer Component" );

require_noerr( result = CAAudioUnit::Open( mixerComp, mMixer ), bailOnErr );
// result = noErr;
#if DEBUG
mMixer.Print(); // looks like the right stuff
#endif
require_noerr( result = mMixer.Uninitialize(), bailOnErr ); // just in case...
// result == noErr;
require_noerr( result = mMixer.SetFormat( kAudioUnitScope_Input, 0, *mStreamDesc ), bailOnErr );
// result == noErr;
require_noerr( result = mMixer.SetFormat( kAudioUnitScope_Output, 0, *mStreamDesc ), bailOnErr );
// result == noErr;


	canDo = mMixer.CanDo( numInputChans, numOutputChans );
		// canDo == true;

	require_noerr( result = mMixer.Initialize(), bailOnErr );
		// result ==  -10875: kAudioUnitErr_FailedInitialization

What am I missing? What (other) properties must be set in the mixer AU before it can be initialized?

Thanks,
Craig Hopson
Red Rock Software



_______________________________________________
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: CAAudioUnit fails Initialization
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: playing audio buffer content - Newbie question
  • Next by Date: Re: CAAudioUnit fails Initialization
  • Previous by thread: Re: playing audio buffer content - Newbie question
  • Next by thread: Re: CAAudioUnit fails Initialization
  • Index(es):
    • Date
    • Thread