Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

AVAudioUnitMBS.AddPropertyListener(ID as UInt32)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: Registeres to receive notifications for when a property changes.
Notes:
When an audio unit property value changes, a PropertyListener event can be called by the audio unit to inform interested parties that this event has occurred.

You must call RemovePropertyListener when you are done with the audio unit.

Lasterror is set.

Feedback, Comments & Corrections

AVAudioUnitMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: The private constructor.

See also:

Feedback, Comments & Corrections

AVAudioUnitMBS.Constructor(audioComponentDescription as AVAudioComponentDescriptionMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: Initializes a newly allocated audio component specified by the description.
Example:
// Needs OS X 10.10 or newer
dim m as new AVAudioUnitComponentManagerMBS

dim a() as AVAudioUnitComponentMBS = m.allComponents

for each c as AVAudioUnitComponentMBS in a
dim d as AVAudioComponentDescriptionMBS = c.audioComponentDescription
'List.AddRow c.Name, c.ManufacturerName, c.LocalizedTypeName, c.VersionString, d.componentType+" "+d.componentSubType

// we look for the mixer
// AUMixer Apple Mixer 1.6.0 aumx smxr

if d.componentType = "aumx" and d.componentSubType = "smxr" then
dim aa as new AVAudioUnitMBS(d)
MsgBox aa.Name
end if

next
Notes: audioComponentDescription: The description of the audio unit to be initialized.

See also:

Feedback, Comments & Corrections

AVAudioUnitMBS.CreateView(PreferredSize as NSSizeMBS) as NSViewMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 18.2 Yes No No Yes, macOS only No
Function: Creates view if possible for the audio unit.
Example:
// audiounit is property of window
dim audiounit as new AVAudioUnitTimePitchMBS

dim preferredSize as new NSSizeMBS(200,100)
// view is property of window
dim view as NSViewMBS = audiounit.CreateView(preferredSize)

dim w as new NSWindowMBS(self)

// set position
view.setFrameOrigin(new NSPointMBS(100, 100))

// add to window
w.contentView.addSubview view
Notes:
Returns nil in case of error.
PreferredSize is the preferred size of the control.

Feedback, Comments & Corrections

AVAudioUnitMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: The destructor.

Feedback, Comments & Corrections

AVAudioUnitMBS.GetParameter(ID as UInt32, Scope as UInt32, Element as UInt32) as Single
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: Get the value of a parameter as specified by its ID, scope and element.
Notes:
Lasterror is set.
If no error occurs, the result is the parameter value.
Please check Apples documentation for possible parameters.

Feedback, Comments & Corrections

AVAudioUnitMBS.GetProperty(ID as UInt32, Scope as UInt32, Element as UInt32) as Memoryblock
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: Retrieves the value of a specified property.
Notes:
The plugin queries the data size, creates a memoryblock, queries the value and returns it.
Lasterror is set.

Feedback, Comments & Corrections

AVAudioUnitMBS.GetPropertyInfo(ID as UInt32, Scope as UInt32, Element as UInt32, byref WriteAble as Boolean) as UInt32
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: Retrieves information about a specified property.
Notes:
The API can be used to retrieve both the size of the property, and whether it is writable or not. In order to get a general answer on the capability of an audio unit, this function should be called before the audio unit is initialized (as some properties are writable when the audio unit is initialized, and others not)
Lasterror is set.

Feedback, Comments & Corrections

AVAudioUnitMBS.installLevelMonitor(CallsPerSecond as Integer, tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: Installs the handler to call LevelMonitor event regularly.
Notes: CallsPerSecond can be between 5 and 50. Tag is stored and passed to the event.

Feedback, Comments & Corrections

AVAudioUnitMBS.RemovePropertyListener(ID as UInt32)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: Remove a previously registered property listener.

Feedback, Comments & Corrections

AVAudioUnitMBS.SetParameter(ID as UInt32, Scope as UInt32, Element as UInt32, Value as Single, inBufferOffsetInFrames as UInt32 = 0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: Set the value of a parameter as specified by its ID, scope and element.
Notes:
Parameter IDs are consistent across all of the elements in a scope - so for a mixer, the "input volume" parameter can be applied on any input, and the particular input is specified by the elementID.

Lasterror is set.
Please check Apples documentation for possible parameters.

Feedback, Comments & Corrections

AVAudioUnitMBS.SetProperty(ID as UInt32, Scope as UInt32, Element as UInt32, data as Memoryblock)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method AVFoundationNode MBS AVFoundation Plugin 15.3 Yes No No Yes, macOS only No
Function: Sets the value of a specified property.
Notes:
Some properties can be cleared by passing data = nil.
Lasterror is set.

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins