Edit

Share via


AudioComponentDescription Struct

Definition

Identifiers for a AudioComponent.

public struct AudioComponentDescription
type AudioComponentDescription = struct
Inheritance
AudioComponentDescription

Remarks

You can either create AudioComponentDescription using the empty constructor and setting all of the fields for the audio component, or you can use one of the convenience factory method that provide strongly typed ways of instantiating the structure.

The following example shows how to use the various Create methods:

auGraph = new AUGraph ();
auGraph.Open ();
int effectNode = auGraph.AddNode (AudioComponentDescription.CreateConverter (AudioTypeConverter.NewTimePitch));
effectUnit = auGraph.GetNodeInfo (effectNode);

int convertToEffectNode = auGraph.AddNode (AudioComponentDescription.CreateConverter (AudioTypeConverter.AU));
convertToEffectUnit = auGraph.GetNodeInfo (convertToEffectNode);

int convertFromEffectNode = auGraph.AddNode (AudioComponentDescription.CreateConverter (AudioTypeConverter.AU));
convertFromEffectUnit = auGraph.GetNodeInfo (convertFromEffectNode);

int genericOutputNode = auGraph.AddNode (AudioComponentDescription.CreateOutput (AudioTypeOutput.Generic));
genericOutputUnit = auGraph.GetNodeInfo (genericOutputNode);

// set the format conversions throughout the graph
AudioStreamBasicDescription effectFormat = effectUnit.GetAudioFormat (AudioUnitScopeType.Output);
var tapFormat = aqTap.ProcessingFormat;

convertToEffectUnit.SetAudioFormat (tapFormat, AudioUnitScopeType.Input);
convertToEffectUnit.SetAudioFormat (effectFormat, AudioUnitScopeType.Output);

convertFromEffectUnit.SetAudioFormat (effectFormat, AudioUnitScopeType.Input);
convertFromEffectUnit.SetAudioFormat (tapFormat, AudioUnitScopeType.Output);

genericOutputUnit.SetAudioFormat (tapFormat, AudioUnitScopeType.Input);
genericOutputUnit.SetAudioFormat (tapFormat, AudioUnitScopeType.Output);

Fields

ComponentFlags
ComponentFlagsMask
ComponentManufacturer
ComponentSubType

Audio Unit component subtype, depending on the ComponentSubType value you should use one of the values from AudioTypeOutputAudioTypeMusicDeviceAudioTypeConverterAudioTypeEffectAudioTypeMixerT:AudioUnit.AudioTypePanner, AudioTypeGenerator

ComponentType

Describes the component type, some of the component types have subtypes, in those cases, you should also set the ComponentSubType property.

Methods

CreateConverter(AudioTypeConverter)

Creates an audio converter component description.

CreateEffect(AudioTypeEffect)

Creates an audio effect component description.

CreateGenerator(AudioTypeGenerator)

Creates an audio generator component description.

CreateGeneric(AudioComponentType, Int32)

Initializes an AudioComponentDescription with the given type and given subtype.   This method is here for cases where you might want to create a component description that is not covered by the built-in enumerations for component subtypes.

CreateMixer(AudioTypeMixer)

Creates an audio mixer component description.

CreateMusicDevice(AudioTypeMusicDevice)

Creates a music effect component description.

CreateOutput(AudioTypeOutput)

Creates an output component description.

CreatePanner(AudioTypePanner)

Creates a panner component description.

ToString()

Returns a debugging message showing the component type and subtype for this description.

Applies to