AudioEndpointDevice
public class AudioEndpointDevice : AudioDevice
A HAL audio endpoint device
Remark
This class correponds to objects with base classkAudioEndPointDeviceClassID
-
Returns the composition
Remark
This corresponds to the propertykAudioEndPointDevicePropertyComposition
Declaration
Swift
public func composition() throws -> [AnyHashable : Any]
-
Returns the audio endpoints owned by
self
Remark
This corresponds to the propertykAudioEndPointDevicePropertyEndPointList
Declaration
Swift
public func endpointList() throws -> [AudioEndpoint]
-
Returns the owning
pid_t
or0
for public devicesRemark
This corresponds to the propertykAudioEndPointDevicePropertyIsPrivate
Declaration
Swift
public func isPrivate() throws -> pid_t
-
Returns
true
ifself
hasselector
inscope
onelement
Declaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<AudioEndpointDevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master) -> Bool
Parameters
selector
The selector of the desired property
scope
The desired scope
element
The desired element
-
Returns
true
ifselector
inscope
onelement
is settableThrows
An error ifself
does not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<AudioEndpointDevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master) throws -> Bool
Parameters
selector
The selector of the desired property
scope
The desired scope
element
The desired element
-
Registers
block
to be performed whenselector
inscope
onelement
changesThrows
An error if the property listener could not be registeredDeclaration
Swift
public func whenSelectorChanges(_ selector: AudioObjectSelector<AudioEndpointDevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master, perform block: PropertyChangeNotificationBlock?) throws
Parameters
selector
The selector of the desired property
scope
The desired scope
element
The desired element
block
A closure to invoke when the property changes or
nil
to remove the previous value