Platforms to show: All Mac Windows Linux Cross-Platform

Back to CoreAudioMBS class.

Previous items

CoreAudioMBS.AudioUnitReset(componenthandle as Integer, scope as Integer, element as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Resets the Audio Unit.

Errorcode is returned.

Useful constants:
kAudioUnitScope_Global= 0
kAudioUnitScope_Input= 1
kAudioUnitScope_Output= 2
kAudioUnitScope_Group= 3
kAudioUnitScope_Part= 4

CoreAudioMBS.AudioUnitSetPropertyMemory(AudioUnit as Integer, propertyID as Integer, AudioUnitScope as Integer, AudioUnitElement as Integer, data as memoryblock, offset as Integer, length as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets a property of an Audio Unit.

Lasterror is set.
Constants for AudioUnitScope:
kAudioUnitScope_Global= 0
kAudioUnitScope_Input= 1
kAudioUnitScope_Output= 2
kAudioUnitScope_Group= 3
kAudioUnitScope_Part= 4

CoreAudioMBS.AudioUnitSetPropertyString(AudioUnit as Integer, propertyID as Integer, AudioUnitScope as Integer, AudioUnitElement as Integer, data as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets a property value for the Audio Unit.

Lasterror is set.
Constants for AudioUnitScope:
kAudioUnitScope_Global= 0
kAudioUnitScope_Input= 1
kAudioUnitScope_Output= 2
kAudioUnitScope_Group= 3
kAudioUnitScope_Part= 4

CoreAudioMBS.AudioUnitUninitialize(componenthandle as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Uninitializes the Audio Unit.

Errorcode is returned.

CoreAudioMBS.CloseComponent(componenthandle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Closes a component.

Do not use the componenthandle any more after this call!

CoreAudioMBS.OpenDefaultComponent(type as string, subtype as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Opens the default component for the given type and subtype string.
Example

Dim c As New CoreAudioMBS

Const kAudioUnitComponentType = "aunt"
Const kAudioUnitSubType_Output = "out "

// open default output component
Dim n As Integer = c.OpenDefaultComponent(kAudioUnitComponentType, kAudioUnitSubType_Output)

If n = 0 Then
Break // failed
Else
Break
// okay, so close
c.CloseComponent(n)
End If

You can check the "QT Components list" example project for which components are installed.
Returns 0 on any error.
type and subtype must be 4 letter codes.

useful constans:
kAudioUnitComponentType= "aunt"
kAudioUnitSubType_Output= "out "
kAudioUnitID_HALOutput= "ahal"
kAudioUnitID_DefaultOutput= "def "
kAudioUnitID_SystemOutput= "sys "
kAudioUnitID_GenericOutput= "genr"
kAudioUnitSubType_MusicDevice= "musd"
kAudioUnitID_DLSSynth= "dls "
kAudioUnitSubType_SampleRateConverter= "srcv"
kAudioUnitID_PolyphaseSRC= "poly"
kAudioUnitSubType_FormatConverter= "fmtc"
kAudioUnitID_Interleaver= "inlv"
kAudioUnitID_Deinterleaver= "dnlv"
kAudioUnitID_AUConverter= "conv"
kAudioUnitSubType_Effect= "efct"
kAudioUnitID_MatrixReverb= "mrev"
kAudioUnitID_Delay= "dely"
kAudioUnitID_LowPassFilter= "lpas"
kAudioUnitID_HighPassFilter= "hpas"
kAudioUnitID_BandPassFilter= "bpas"
kAudioUnitID_PeakLimiter= "lmtr"
kAudioUnitID_DynamicsProcessor= "dcmp"
kAudioUnitSubType_Mixer= "mixr"
kAudioUnitID_StereoMixer= "smxr"
kAudioUnitID_3DMixer= "3dmx"

Previous items

The items on this page are in the following plugins: MBS MacOSX Plugin.


💬 Ask a question or report a problem
The biggest plugin in space...