Platforms to show: All Mac Windows Linux Cross-Platform

Back to CoreAudioMBS class.

Next items

CoreAudioMBS.AudioDeviceGetPropertyCFString(AudioDeviceID as Integer, channel as Integer, isinput as boolean, propertyID as string) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 10.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property value from the Audio Device.
Example:

Dim c As New CoreAudioMBS

Dim DefaultInputDeviceMem As MemoryBlock = c.AudioHardwareGetPropertyMemory(c.kAudioHardwarePropertyDefaultInputDevice)
Dim DefaultInputDeviceID As Integer = DefaultInputDeviceMem.Long(0)
Dim DefaultInputDeviceCFName As CFStringMBS = c.AudioDeviceGetPropertyCFString(DefaultInputDeviceID, 0, True, c.kAudioDevicePropertyDeviceNameCFString)
Dim DefaultInputDeviceName As String = DefaultInputDeviceCFName.Str

MessageBox DefaultInputDeviceName
Notes:
Lasterror is set.
The property you query must be one of the CFString properties.
CoreAudioMBS.AudioDeviceGetPropertyInfo(AudioDeviceID as Integer, channel as Integer, isinput as boolean, propertyID as string, byref size as Integer, byref writeable as boolean)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets property information from an Audio Unit.
Example:

Dim c As New CoreAudioMBS

Dim DefaultInputDeviceMem As MemoryBlock = c.AudioHardwareGetPropertyMemory(c.kAudioHardwarePropertyDefaultInputDevice)
Dim DefaultInputDeviceID As Integer = DefaultInputDeviceMem.Long(0)

Dim size As Integer
Dim writeable As Boolean

c.AudioDeviceGetPropertyInfo(DefaultInputDeviceID, 0, True, c.kAudioDevicePropertyDeviceName, size, writeable)

If writeable Then
MessageBox "Writeable, "+size.ToString+" bytes"
Else
MessageBox "Read only, "+size.ToString+" bytes"
End If
Notes: Lasterror is set.
CoreAudioMBS.AudioDeviceGetPropertyMemory(AudioDeviceID as Integer, channel as Integer, isinput as boolean, propertyID as string) as memoryblock
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property value from the Audio Device.
Example:

Dim c As New CoreAudioMBS

Dim DefaultOutputDeviceMem As MemoryBlock = c.AudioHardwareGetPropertyMemory(c.kAudioHardwarePropertyDefaultOutputDevice)
Dim DefaultOutputDeviceID As Integer = DefaultOutputDeviceMem.Long(0)

Dim mem1 As MemoryBlock = c.AudioDeviceGetPropertyMemory(DefaultOutputDeviceID, 0, False, c.kAudioDevicePropertyVolumeDecibels)
Dim VolumeDecibels As Single = mem1.SingleValue(0)

Dim mem2 As MemoryBlock = c.AudioDeviceGetPropertyMemory(DefaultOutputDeviceID, 0, False, c.kAudioDevicePropertyVolumeScalar)
Dim VolumeScalar As Single = mem2.SingleValue(0)

Break
Notes: Lasterror is set.

Some examples using this method:

CoreAudioMBS.AudioDeviceGetPropertyString(AudioDeviceID as Integer, channel as Integer, isinput as boolean, propertyID as string) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property value from the Audio Device.
Example:

Dim c As New CoreAudioMBS

Dim DefaultInputDeviceMem As MemoryBlock = c.AudioHardwareGetPropertyMemory(c.kAudioHardwarePropertyDefaultInputDevice)
Dim DefaultInputDeviceID As Integer = DefaultInputDeviceMem.Long(0)
Dim DefaultInputDeviceName As String = c.AudioDeviceGetPropertyString(DefaultInputDeviceID, 0, True, c.kAudioDevicePropertyDeviceName)

MessageBox DefaultInputDeviceName
Notes: Lasterror is set.

Some examples using this method:

CoreAudioMBS.AudioDeviceSetPropertyMemory(AudioDeviceID as Integer, when as memoryblock, channel as Integer, isinput as boolean, propertyID as string, 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
Function: Sets a property value for the Audio Device.
Example:

Dim c As New CoreAudioMBS

Dim DefaultOutputDeviceMem As MemoryBlock = c.AudioHardwareGetPropertyMemory(c.kAudioHardwarePropertyDefaultOutputDevice)
Dim DefaultOutputDeviceID As Integer = DefaultOutputDeviceMem.Long(0)

Dim mem1 As MemoryBlock = c.AudioDeviceGetPropertyMemory(DefaultOutputDeviceID, 0, False, c.kAudioDevicePropertyVolumeScalar)
Dim VolumeScalar As Single = mem1.SingleValue(0)

// set volume to 50%
Dim VolumeScalar2 As Single = 0.5
Dim mem2 As New MemoryBlock(4)
mem2.SingleValue(0) = VolumeScalar2

c.AudioDeviceSetPropertyMemory(DefaultOutputDeviceID, Nil, 0, False, c.kAudioDevicePropertyVolumeScalar, mem2, 0, mem2.Size)

// now query again
Dim mem3 As MemoryBlock = c.AudioDeviceGetPropertyMemory(DefaultOutputDeviceID, 0, False, c.kAudioDevicePropertyVolumeScalar)
Dim VolumeScalar3 As Single = mem3.SingleValue(0)

Break
Notes: Lasterror is set.
CoreAudioMBS.AudioDeviceSetPropertyString(AudioDeviceID as Integer, when as memoryblock, channel as Integer, isinput as boolean, propertyID as string, data as string)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Sets a property value for the Audio Device.
Notes: Lasterror is set.
CoreAudioMBS.AudioHardwareGetPropertyCFString(propertyID as string) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 10.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property value from the Audio Hardware.
Notes:
Lasterror is set.
The property you query must be one of the CFString properties.
CoreAudioMBS.AudioHardwareGetPropertyInfo(propertyID as string, byref size as Integer, byref writeable as boolean)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets property information from the Audio Hardware.
Example:

Dim c As New CoreAudioMBS

Dim writeable As Boolean
Dim size As Integer
c.AudioHardwareGetPropertyInfo(c.kAudioHardwarePropertyDefaultOutputDevice, size, writeable)

If writeable Then
MessageBox "Writeable, "+size.ToString+" bytes"
else
MessageBox "Read only, "+size.ToString+" bytes"
End If
Notes: Lasterror is set.

Some examples using this method:

CoreAudioMBS.AudioHardwareGetPropertyMemory(propertyID as string) as memoryblock
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property value from the Audio Hardware.
Example:

Dim c As New CoreAudioMBS

Dim DefaultInputDeviceMem As MemoryBlock = c.AudioHardwareGetPropertyMemory(c.kAudioHardwarePropertyDefaultInputDevice)
Dim DefaultInputDeviceID As Integer = DefaultInputDeviceMem.Long(0)
Dim DefaultInputDeviceName As String = c.AudioDeviceGetPropertyString(DefaultInputDeviceID, 0, True, c.kAudioDevicePropertyDeviceName)

MessageBox DefaultInputDeviceName
Notes: Lasterror is set.

Some examples using this method:

CoreAudioMBS.AudioHardwareGetPropertyString(propertyID as string) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property value from the Audio Hardware.
Notes: Lasterror is set.
CoreAudioMBS.AudioHardwareSetPropertyMemory(propertyID as string, 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
Function: Sets a property value for the Audio Hardware.
Notes: Lasterror is set.
CoreAudioMBS.AudioHardwareSetPropertyString(propertyID as string, data as string)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Sets a property value for the Audio Hardware.
Notes: Lasterror is set.
CoreAudioMBS.AudioObjectGetPropertyData(inObjectID as Integer, AddressSelector as UInt32, AddressScope as UInt32, AddressElement as UInt32, QualifierData as memoryblock = nil, InputData as Memoryblock = nil) as memoryblock
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: Queries an AudioObject to get the data of the given property and places it in the provided buffer.
Notes:
The plugin queries size and creates a buffer for the result.

inObjectID: The AudioObject to query.
AddressSelector, AddressScope or AddressElement: An audio object property address indicating which property is being queried.
QualifierData: A buffer of data to be used in determining the data of the property being queried. Note that not all properties require qualification, in which case this value will be nil.

If InputData is nil, we query size and allocate buffer of required size.
If InputData is not nil, we use this memoryblock with its size. Result is InputData on success.

Lasterror is set.
CoreAudioMBS.AudioObjectGetPropertyDataSize(inObjectID as Integer, AddressSelector as UInt32, AddressScope as UInt32, AddressElement as UInt32, QualifierData as memoryblock = nil) as UInt32
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: Queries an AudioObject to find the size of the data for the given property.
Notes:
inObjectID: The AudioObject to query.
AddressSelector, AddressScope or AddressElement: An audio object property address indicating which property is being queried.
QualifierData: A buffer of data to be used in determining the data of the property being queried. Note that not all properties require qualification, in which case this value will be nil.

Returns an UInt32 indicating how many bytes the data for the given property occupies.
Lasterror is set.
CoreAudioMBS.AudioObjectSetPropertyData(inObjectID as Integer, AddressSelector as UInt32, AddressScope as UInt32, AddressElement as UInt32, Data as Memoryblock, QualifierData as memoryblock = nil)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 14.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Function: Tells an AudioObject to change the value of the given property using the provided data.
Notes:
inObjectID: The AudioObject to query.
AddressSelector, AddressScope or AddressElement: An audio object property address indicating which property is being queried.
QualifierData: A buffer of data to be used in determining the data of the property being queried. Note that not all properties require qualification, in which case this value will be nil.

Lasterror is set.
CoreAudioMBS.AudioOutputUnitStart(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
Function: Starts the Audio Unit.
Notes: Errorcode is returned.
CoreAudioMBS.AudioOutputUnitStop(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
Function: Stops the AudioUnit.
Notes: Errorcode is returned.
CoreAudioMBS.AudioStreamGetPropertyCFString(AudioStreamID as Integer, channel as Integer, propertyID as string) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 10.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property value from the Audio Stream.
Notes:
Lasterror is set.
The property you query must be one of the CFString properties.
CoreAudioMBS.AudioStreamGetPropertyInfo(AudioStreamID as Integer, channel as Integer, propertyID as string, byref size as Integer, byref writeable as boolean)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets property information from an Audio Stream.
Notes: Lasterror is set.
CoreAudioMBS.AudioStreamGetPropertyMemory(AudioStreamID as Integer, channel as Integer, propertyID as string) as memoryblock
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property value from the Audio Stream.
Notes: Lasterror is set.
CoreAudioMBS.AudioStreamGetPropertyString(AudioStreamID as Integer, channel as Integer, propertyID as string) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property value from the Audio Stream.
Notes: Lasterror is set.
CoreAudioMBS.AudioStreamSetPropertyMemory(AudioStreamID as Integer, when as memoryblock, channel as Integer, propertyID as string, 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
Function: Sets a property value for the Audio Stream.
Notes: Lasterror is set.
CoreAudioMBS.AudioStreamSetPropertyString(AudioStreamID as Integer, when as memoryblock, channel as Integer, propertyID as string, data as string)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Sets a property value for the Audio Stream.
Notes: Lasterror is set.
CoreAudioMBS.AudioUnitGetParameter(AudioUnit as Integer, ParameterID as Integer, AudioUnitScope as Integer, AudioUnitElement as Integer) as single
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets an audio unit parameter.
CoreAudioMBS.AudioUnitGetPropertyCFString(AudioUnit as Integer, propertyID as Integer, AudioUnitScope as Integer, AudioUnitElement as Integer) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 10.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property of an Audio Unit.
Notes:
Lasterror is set.
Constants for AudioUnitScope:
kAudioUnitScope_Global= 0
kAudioUnitScope_Input= 1
kAudioUnitScope_Output= 2
kAudioUnitScope_Group= 3
kAudioUnitScope_Part= 4

The property you query must be one of the CFString properties.
CoreAudioMBS.AudioUnitGetPropertyInfo(AudioUnit as Integer, propertyID as Integer, AudioUnitScope as Integer, AudioUnitElement as Integer, byref size as Integer, byref writeable as boolean)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets property information from the Audio Unit.
Notes:
Lasterror is set.
Constants for AudioUnitScope:
kAudioUnitScope_Global= 0
kAudioUnitScope_Input= 1
kAudioUnitScope_Output= 2
kAudioUnitScope_Group= 3
kAudioUnitScope_Part= 4
CoreAudioMBS.AudioUnitGetPropertyMemory(AudioUnit as Integer, propertyID as Integer, AudioUnitScope as Integer, AudioUnitElement as Integer) as memoryblock
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property of an Audio Unit.
Notes:
Lasterror is set.
Constants for AudioUnitScope:
kAudioUnitScope_Global= 0
kAudioUnitScope_Input= 1
kAudioUnitScope_Output= 2
kAudioUnitScope_Group= 3
kAudioUnitScope_Part= 4
CoreAudioMBS.AudioUnitGetPropertyString(AudioUnit as Integer, propertyID as Integer, AudioUnitScope as Integer, AudioUnitElement as Integer) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS MacOSX Plugin 4.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: Gets a property of an Audio Unit.
Notes:
Lasterror is set.
Constants for AudioUnitScope:
kAudioUnitScope_Global= 0
kAudioUnitScope_Input= 1
kAudioUnitScope_Output= 2
kAudioUnitScope_Group= 3
kAudioUnitScope_Part= 4
CoreAudioMBS.AudioUnitInitialize(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
Function: Initializes the Audio Unit.
Notes: Errorcode is returned.

Next 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...


Start Chat