AudioBox
public class AudioBox : AudioObject
A HAL audio box object
This class has a single scope (kAudioObjectPropertyScopeGlobal) and a single element (kAudioObjectPropertyElementMaster)
Remark
This class correponds to objects with base classkAudioBoxClassID
-
Returns the available audio boxes
Remark
This corresponds to the propertykAudioHardwarePropertyBoxListonkAudioObjectSystemObjectDeclaration
Swift
public class func boxes() throws -> [AudioBox] -
Returns an initialized
AudioBoxwithuidornilif unknownRemark
This corresponds to the propertykAudioHardwarePropertyTranslateUIDToBoxonkAudioObjectSystemObjectDeclaration
Swift
public class func makeBox(forUID uid: String) throws -> AudioBox?Parameters
uidThe UID of the desired box
-
Undocumented
Declaration
Swift
public override var debugDescription: String { get } -
Returns the box UID
Remark
This corresponds to the propertykAudioBoxPropertyBoxUIDDeclaration
Swift
public func boxUID() throws -> String -
Returns the transport type
Remark
This corresponds to the propertykAudioBoxPropertyTransportTypeDeclaration
Swift
public func transportType() throws -> AudioDevice.TransportType -
Returns
trueif the box has audioRemark
This corresponds to the propertykAudioBoxPropertyHasAudioDeclaration
Swift
public func hasAudio() throws -> Bool -
Returns
trueif the box has videoRemark
This corresponds to the propertykAudioBoxPropertyHasVideoDeclaration
Swift
public func hasVideo() throws -> Bool -
Returns
trueif the box has MIDIRemark
This corresponds to the propertykAudioBoxPropertyHasMIDIDeclaration
Swift
public func hasMIDI() throws -> Bool -
Returns
trueif the box is acquiredRemark
This corresponds to the propertykAudioBoxPropertyAcquiredDeclaration
Swift
public func acquired() throws -> Bool -
Returns the audio devices provided by the box
Remark
This corresponds to the propertykAudioBoxPropertyDeviceListDeclaration
Swift
public func deviceList() throws -> [AudioDevice] -
Returns the audio clock devices provided by the box
Remark
This corresponds to the propertykAudioBoxPropertyClockDeviceListDeclaration
Swift
public func clockDeviceList() throws -> [AudioClockDevice] -
Returns
trueifselfhasselectorDeclaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<AudioBox>) -> BoolParameters
selectorThe selector of the desired property
-
Returns
trueifselectoris settableThrows
An error ifselfdoes not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<AudioBox>) throws -> BoolParameters
selectorThe selector of the desired property
-
Registers
blockto be performed whenselectorchangesThrows
An error if the property listener could not be registeredDeclaration
Swift
public func whenSelectorChanges(_ selector: AudioObjectSelector<AudioBox>, perform block: PropertyChangeNotificationBlock?) throwsParameters
selectorThe selector of the desired property
blockA closure to invoke when the property changes or
nilto remove the previous value
View on GitHub
AudioBox Class Reference