• 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
Error Code -50 (paramErr) on AUGraphNodeInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error Code -50 (paramErr) on AUGraphNodeInfo


  • Subject: Error Code -50 (paramErr) on AUGraphNodeInfo
  • From: Carter Allen <email@hidden>
  • Date: Sat, 19 Jun 2010 14:33:43 -0600

Hello again!

I am attempting to create an AUGraph with a mixer unit and an output RemoteIO unit. I have been using the iPhoneMultichannelMixerTest project as a reference, and this particular piece of code is almost identical to the corresponding section in the sample project. When running this section of code, I stop on the last exception, when getting the node info for the mixer unit. The OSStatus code received back is -50, which I have read is a paramErr. I'm at a loss for what I'm doing wrong, as this has barely been altered from the sample code (which runs perfectly). Can anyone see what would be causing the paramErr?

	// Create an AUGraph.
	result = NewAUGraph(&graph);
	if (result) {
		[NSException raise:@"SSAudioManagerNewGraphException" format:@"There was an error while attempting to create a new AUGraph."];
		return;
	}

	// Create two AudioComponentDescription structs, one for the output AU and one for the mixer AU.

	// Output AU:
	AudioComponentDescription outputComponentDescription;
	outputComponentDescription.componentType = kAudioUnitType_Output;
	outputComponentDescription.componentSubType = kAudioUnitSubType_RemoteIO;
	outputComponentDescription.componentManufacturer = kAudioUnitManufacturer_Apple;
	outputComponentDescription.componentFlags = 0;
	outputComponentDescription.componentFlagsMask = 0;

	// Mixer AU:
	AudioComponentDescription mixerComponentDescription;
	mixerComponentDescription.componentType = kAudioUnitType_Mixer;
	mixerComponentDescription.componentSubType = kAudioUnitSubType_MultiChannelMixer;
	mixerComponentDescription.componentManufacturer = kAudioUnitManufacturer_Apple;
	mixerComponentDescription.componentFlags = 0;
	mixerComponentDescription.componentFlagsMask = 0;

	// Add two new AudioUnits to the graph using the two descriptions we just created.

	// Output AU:
	AUNode outputNode;
	result = AUGraphAddNode(graph, &outputComponentDescription, &outputNode);
	if (result) {
		[NSException raise:@"SSAudioManagerAddOutputNodeException" format:@"There was an error while attempting to add the output node to the graph."];
		return;
	}

	// Mixer AU:
	AUNode mixerNode;
	result = AUGraphAddNode(graph, &mixerComponentDescription, &mixerNode);
	if (result) {
		[NSException raise:@"SSAudioManagerAddMixerNodeException" format:@"There was an error while attempting to add the mixer node to the graph."];
		return;
	}

	// Connect the mixer's output bus to the output's input bus.
	result = AUGraphConnectNodeInput(graph, mixerNode, 0, outputNode, 0);
	if (result) {
		[NSException raise:@"SSAudioManagerConnectMixerAndOutputException" format:@"There was an error while attempting to connect the output bus of the mixer node to the input of the output node."];
		return;
	}

	// Open the graph.
	result = AUGraphOpen(graph);
	if (result) {
		[NSException raise:@"SSAudioManagerOpenGraphException" format:@"There was an error while attempting to open the graph."];
		return;
	}

	// Get the mixer AU and store a pointer to it as an ivar.
	result = AUGraphNodeInfo(graph, mixerNode, NULL, &mixer);
	if (result) {
		[NSException raise:@"SSAudioManagerGetMixerAUException" format:@"There was an error while attempting to get the mixer AU and store it as an ivar."];
		return;
	}

Thanks for any help you can give me!

Sincerely,
Carter Allen _______________________________________________
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: Error Code -50 (paramErr) on AUGraphNodeInfo
      • From: Carter Allen <email@hidden>
  • Prev by Date: Re: render callback: To memclear or not to memclear; that is the question...
  • Next by Date: MIDIClientCreate taking *very* long in 10.6.4 ?
  • Previous by thread: Re: Mixing manually vs. Mixer AudioUnit and avoiding clipping
  • Next by thread: Re: Error Code -50 (paramErr) on AUGraphNodeInfo
  • Index(es):
    • Date
    • Thread