AudioObject
public class AudioObject : CustomDebugStringConvertibleextension AudioObject: HashableA HAL audio object
- 
                  
                  The underlying audio object ID DeclarationSwift public let objectID: AudioObjectID
- 
                  
                  Returns trueifselfhaspropertyDeclarationSwift public final func hasProperty(_ property: PropertyAddress) -> BoolParameterspropertyThe property to query 
- 
                  
                  Returns trueifpropertyis settableThrows An error ifselfdoes not havepropertyDeclarationSwift public final func isPropertySettable(_ property: PropertyAddress) throws -> BoolParameterspropertyThe property to query 
- 
                  
                  A block called with one or more changed audio object properties DeclarationSwift public typealias PropertyChangeNotificationBlock = (_ changes: [PropertyAddress]) -> VoidParameterschangesAn array of changed property addresses 
- 
                  
                  Registers blockto be performed whenpropertychangesThrows An error if the property listener could not be registeredDeclarationSwift public final func whenPropertyChanges(_ property: PropertyAddress, perform block: PropertyChangeNotificationBlock?) throwsParameterspropertyThe property to observe blockA closure to invoke when propertychanges ornilto remove the previous value
- 
                  
                  DeclarationSwift public var debugDescription: String { get }
- 
                  
                  DeclarationSwift public static func == (lhs: AudioObject, rhs: AudioObject) -> Bool
- 
                  
                  DeclarationSwift public func hash(into hasher: inout Hasher)
- 
                  
                  Returns the numeric value of propertyNote The underlying audio object property must be backed by an equivalent native C type ofTThrows An error ifselfdoes not havepropertyor the property value could not be retrievedDeclarationSwift public func getProperty<T>(_ property: PropertyAddress, type: T.Type, qualifier: PropertyQualifier? = nil, initialValue: T = 0) throws -> T where T : NumericParameterspropertyThe address of the desired property typeThe underlying numeric type qualifierAn optional property qualifier initialValueAn optional initial value for outDatawhen callingAudioObjectGetPropertyData
- 
                  
                  Returns the Core Foundation object value of propertyNote The underlying audio object property must be backed by a Core Foundation object and return aCFTypewith a +1 retain countThrows An error ifselfdoes not havepropertyor the property value could not be retrievedDeclarationSwift public func getProperty<T>(_ property: PropertyAddress, type: T.Type, qualifier: PropertyQualifier? = nil) throws -> T where T : AnyObjectParameterspropertyThe address of the desired property typeThe underlying CFTypequalifierAn optional property qualifier 
- 
                  
                  Returns the AudioValueRangevalue ofpropertyNote The underlying audio object property must be backed byAudioValueRangeThrows An error ifselfdoes not havepropertyor the property value could not be retrievedDeclarationSwift public func getProperty(_ property: PropertyAddress) throws -> AudioValueRangeParameterspropertyThe address of the desired property 
- 
                  
                  Returns the AudioStreamBasicDescriptionvalue ofpropertyNote The underlying audio object property must be backed byAudioStreamBasicDescriptionThrows An error ifselfdoes not havepropertyor the property value could not be retrievedDeclarationSwift public func getProperty(_ property: PropertyAddress) throws -> AudioStreamBasicDescriptionParameterspropertyThe address of the desired property 
- 
                  
                  Sets the value of propertytovalueNote The underlying audio object property must be backed byTThrows An error ifselfdoes not haveproperty,propertyis not settable, or the property value could not be setDeclarationSwift public func setProperty<T>(_ property: PropertyAddress, to value: T) throwsParameterspropertyThe address of the desired property valueThe desired value 
- 
                  
                  Returns the array value of propertyNote The underlying audio object property must be backed by a C array ofTThrows An error ifselfdoes not havepropertyor the property value could not be retrievedDeclarationSwift public func getProperty<T>(_ property: PropertyAddress, elementType type: T.Type, qualifier: PropertyQualifier? = nil) throws -> [T]ParameterspropertyThe address of the desired property typeThe underlying array element type qualifierAn optional property qualifier 
- 
                  
                  Sets the value of propertytovalueNote The underlying audio object property must be backed by a C array ofTThrows An error ifselfdoes not haveproperty,propertyis not settable, or the property value could not be setDeclarationSwift public func setProperty<T>(_ property: PropertyAddress, to value: [T]) throwsParameterspropertyThe address of the desired property valueThe desired value 
- 
                  
                  Returns the base class of the underlying HAL audio object Remark This corresponds to the propertykAudioObjectPropertyBaseClassDeclarationSwift public func baseClass() throws -> AudioClassID
- 
                  
                  Returns the class of the underlying HAL audio object Remark This corresponds to the propertykAudioObjectPropertyClassDeclarationSwift public func `class`() throws -> AudioClassID
- 
                  
                  Returns the audio object’s owning object Remark This corresponds to the propertykAudioObjectPropertyOwnerNote The system audio object does not have an ownerDeclarationSwift public func owner() throws -> AudioObject
- 
                  
                  Returns the audio object’s name Remark This corresponds to the propertykAudioObjectPropertyNameDeclarationSwift public func name() throws -> String
- 
                  
                  Returns the audio object’s model name Remark This corresponds to the propertykAudioObjectPropertyModelNameDeclarationSwift public func modelName() throws -> String
- 
                  
                  Returns the audio object’s manufacturer Remark This corresponds to the propertykAudioObjectPropertyManufacturerDeclarationSwift public func manufacturer() throws -> String
- 
                  
                  Returns the name of elementRemark This corresponds to the propertykAudioObjectPropertyElementNameDeclarationSwift public func nameOfElement(_ element: PropertyElement, inScope scope: PropertyScope = .global) throws -> StringParameterselementThe desired element scopeThe desired scope 
- 
                  
                  Returns the category name of elementinscopeRemark This corresponds to the propertykAudioObjectPropertyElementCategoryNameDeclarationSwift public func categoryNameOfElement(_ element: PropertyElement, inScope scope: PropertyScope = .global) throws -> StringParameterselementThe desired element scopeThe desired scope 
- 
                  
                  Returns the number name of elementRemark This corresponds to the propertykAudioObjectPropertyElementNumberNameDeclarationSwift public func numberNameOfElement(_ element: PropertyElement, inScope scope: PropertyScope = .global) throws -> String
- 
                  
                  Returns the audio objects owned by selfRemark This corresponds to the propertykAudioObjectPropertyOwnedObjectsDeclarationSwift public func ownedObjects(ofType type: [AudioClassID]? = nil) throws -> [AudioObject]ParameterstypeAn optional array of AudioClassIDs to which the returned objects will be restricted
- 
                  
                  Returns trueif the audio object’s hardware is drawing attention to itselfRemark This corresponds to the propertykAudioObjectPropertyIdentifyDeclarationSwift public func identify() throws -> Bool
- 
                  
                  Sets whether the audio object’s hardware should draw attention to itself Remark This corresponds to the propertykAudioObjectPropertyIdentifyDeclarationSwift public func setIdentify(_ value: Bool) throwsParametersvalueWhether the audio hardware should draw attention to itself 
- 
                  
                  Returns the audio object’s serial number Remark This corresponds to the propertykAudioObjectPropertySerialNumberDeclarationSwift public func serialNumber() throws -> String
- 
                  
                  Returns the audio object’s firmware version Remark This corresponds to the propertykAudioObjectPropertyFirmwareVersionDeclarationSwift public func firmwareVersion() throws -> String
- 
                  
                  Creates and returns an initialized AudioObjectWhenever possible this will return a specialized subclass exposing additional functionality DeclarationSwift public class func make(_ objectID: AudioObjectID) -> AudioObjectParametersobjectIDThe audio object ID 
- 
                  
                  Returns trueifselfhasselectorinscopeonelementDeclarationSwift public func hasSelector(_ selector: AudioObjectSelector<AudioObject>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master) -> BoolParametersselectorThe selector of the desired property scopeThe desired scope elementThe desired element 
- 
                  
                  Returns trueifselectorinscopeonelementis settableThrows An error ifselfdoes not have the requested propertyDeclarationSwift public func isSelectorSettable(_ selector: AudioObjectSelector<AudioObject>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master) throws -> BoolParametersselectorThe 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 registeredDeclarationSwift public func whenSelectorChanges(_ selector: AudioObjectSelector<AudioObject>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master, perform block: PropertyChangeNotificationBlock?) throwsParametersselectorThe 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
View on GitHub AudioObject Class Reference
        AudioObject Class Reference