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 propertykAudioEndPointDevicePropertyCompositionDeclaration
Swift
public func composition() throws -> [AnyHashable : Any] -
Returns the audio endpoints owned by
selfRemark
This corresponds to the propertykAudioEndPointDevicePropertyEndPointListDeclaration
Swift
public func endpointList() throws -> [AudioEndpoint] -
Returns the owning
pid_tor0for public devicesRemark
This corresponds to the propertykAudioEndPointDevicePropertyIsPrivateDeclaration
Swift
public func isPrivate() throws -> pid_t -
Returns
trueifselfhasselectorinscopeonelementDeclaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<AudioEndpointDevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master) -> BoolParameters
selectorThe selector of the desired property
scopeThe desired scope
elementThe desired element
-
Returns
trueifselectorinscopeonelementis settableThrows
An error ifselfdoes not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<AudioEndpointDevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master) throws -> BoolParameters
selectorThe selector of the desired property
scopeThe desired scope
elementThe desired element
-
Registers
blockto be performed whenselectorinscopeonelementchangesThrows
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?) throwsParameters
selectorThe selector of the desired property
scopeThe desired scope
elementThe desired element
blockA closure to invoke when the property changes or
nilto remove the previous value
View on GitHub
AudioEndpointDevice Class Reference