Platforms to show: All Mac Windows Linux Cross-Platform
Back to CoreAudioMBS class.
CoreAudioMBS.AudioDeviceGetPropertyCFString(AudioDeviceID as Integer, channel as Integer, isinput as boolean, propertyID as string) as string
Function:
Gets a property value from the Audio Device.
Example:
Notes:
Lasterror is set.
The property you query must be one of the CFString properties.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 10.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
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)
Function:
Gets property information from an Audio Unit.
Example:
Notes:
Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
CoreAudioMBS.AudioDeviceGetPropertyMemory(AudioDeviceID as Integer, channel as Integer, isinput as boolean, propertyID as string) as memoryblock
Function:
Gets a property value from the Audio Device.
Example:
Notes:
Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
Some examples using this method:
CoreAudioMBS.AudioDeviceGetPropertyString(AudioDeviceID as Integer, channel as Integer, isinput as boolean, propertyID as string) as string
Function:
Gets a property value from the Audio Device.
Example:
Notes:
Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
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)
Function:
Sets a property value for the Audio Device.
Example:
Notes:
Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
CoreAudioMBS.AudioDeviceSetPropertyString(AudioDeviceID as Integer, when as memoryblock, channel as Integer, isinput as boolean, propertyID as string, data as string)
Function:
Sets a property value for the Audio Device.
Notes: Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes: Lasterror is set.
CoreAudioMBS.AudioHardwareGetPropertyCFString(propertyID as string) as string
Function:
Gets a property value from the Audio Hardware.
Notes:
Lasterror is set.
The property you query must be one of the CFString properties.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 10.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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)
Function:
Gets property information from the Audio Hardware.
Example:
Notes:
Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
Some examples using this method:
CoreAudioMBS.AudioHardwareGetPropertyMemory(propertyID as string) as memoryblock
Function:
Gets a property value from the Audio Hardware.
Example:
Notes:
Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
Some examples using this method:
CoreAudioMBS.AudioHardwareGetPropertyString(propertyID as string) as string
Function:
Gets a property value from the Audio Hardware.
Notes: Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes: Lasterror is set.
CoreAudioMBS.AudioHardwareSetPropertyMemory(propertyID as string, data as memoryblock, offset as Integer, length as Integer)
Function:
Sets a property value for the Audio Hardware.
Notes: Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes: Lasterror is set.
CoreAudioMBS.AudioHardwareSetPropertyString(propertyID as string, data as string)
Function:
Sets a property value for the Audio Hardware.
Notes: Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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)
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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
Function:
Starts the Audio Unit.
Notes: Errorcode is returned.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Notes: Errorcode is returned.
CoreAudioMBS.AudioOutputUnitStop(componenthandle as Integer) as Integer
Function:
Stops the AudioUnit.
Notes: Errorcode is returned.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Notes: Errorcode is returned.
CoreAudioMBS.AudioStreamGetPropertyCFString(AudioStreamID as Integer, channel as Integer, propertyID as string) as string
Function:
Gets a property value from the Audio Stream.
Notes:
Lasterror is set.
The property you query must be one of the CFString properties.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 10.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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)
Function:
Gets property information from an Audio Stream.
Notes: Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes: Lasterror is set.
CoreAudioMBS.AudioStreamGetPropertyMemory(AudioStreamID as Integer, channel as Integer, propertyID as string) as memoryblock
Function:
Gets a property value from the Audio Stream.
Notes: Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes: Lasterror is set.
CoreAudioMBS.AudioStreamGetPropertyString(AudioStreamID as Integer, channel as Integer, propertyID as string) as string
Function:
Gets a property value from the Audio Stream.
Notes: Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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)
Function:
Sets a property value for the Audio Stream.
Notes: Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes: Lasterror is set.
CoreAudioMBS.AudioStreamSetPropertyString(AudioStreamID as Integer, when as memoryblock, channel as Integer, propertyID as string, data as string)
Function:
Sets a property value for the Audio Stream.
Notes: Lasterror is set.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Notes: Lasterror is set.
CoreAudioMBS.AudioUnitGetParameter(AudioUnit as Integer, ParameterID as Integer, AudioUnitScope as Integer, AudioUnitElement as Integer) as single
Function:
Gets an audio unit parameter.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CoreAudioMBS.AudioUnitGetPropertyCFString(AudioUnit as Integer, propertyID as Integer, AudioUnitScope as Integer, AudioUnitElement as Integer) as string
Function:
Gets a property of an Audio Unit.
Notes:
Lasterror is set.
Constants for AudioUnitScope:
The property you query must be one of the CFString properties.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 10.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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)
Function:
Gets property information from the Audio Unit.
Notes:
Lasterror is set.
Constants for AudioUnitScope:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
Function:
Gets a property of an Audio Unit.
Notes:
Lasterror is set.
Constants for AudioUnitScope:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
Function:
Gets a property of an Audio Unit.
Notes:
Lasterror is set.
Constants for AudioUnitScope:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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
Function:
Initializes the Audio Unit.
Notes: Errorcode is returned.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS MacOSX Plugin | 4.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Notes: Errorcode is returned.
The items on this page are in the following plugins: MBS MacOSX Plugin.
