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 propertykAudioHardwarePropertyBoxList
onkAudioObjectSystemObject
Declaration
Swift
public class func boxes() throws -> [AudioBox]
-
Returns an initialized
AudioBox
withuid
ornil
if unknownRemark
This corresponds to the propertykAudioHardwarePropertyTranslateUIDToBox
onkAudioObjectSystemObject
Declaration
Swift
public class func makeBox(forUID uid: String) throws -> AudioBox?
Parameters
uid
The UID of the desired box
-
Undocumented
Declaration
Swift
public override var debugDescription: String { get }
-
Returns the box UID
Remark
This corresponds to the propertykAudioBoxPropertyBoxUID
Declaration
Swift
public func boxUID() throws -> String
-
Returns the transport type
Remark
This corresponds to the propertykAudioBoxPropertyTransportType
Declaration
Swift
public func transportType() throws -> AudioDevice.TransportType
-
Returns
true
if the box has audioRemark
This corresponds to the propertykAudioBoxPropertyHasAudio
Declaration
Swift
public func hasAudio() throws -> Bool
-
Returns
true
if the box has videoRemark
This corresponds to the propertykAudioBoxPropertyHasVideo
Declaration
Swift
public func hasVideo() throws -> Bool
-
Returns
true
if the box has MIDIRemark
This corresponds to the propertykAudioBoxPropertyHasMIDI
Declaration
Swift
public func hasMIDI() throws -> Bool
-
Returns
true
if the box is acquiredRemark
This corresponds to the propertykAudioBoxPropertyAcquired
Declaration
Swift
public func acquired() throws -> Bool
-
Returns the audio devices provided by the box
Remark
This corresponds to the propertykAudioBoxPropertyDeviceList
Declaration
Swift
public func deviceList() throws -> [AudioDevice]
-
Returns the audio clock devices provided by the box
Remark
This corresponds to the propertykAudioBoxPropertyClockDeviceList
Declaration
Swift
public func clockDeviceList() throws -> [AudioClockDevice]
-
Returns
true
ifself
hasselector
Declaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<AudioBox>) -> Bool
Parameters
selector
The selector of the desired property
-
Returns
true
ifselector
is settableThrows
An error ifself
does not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<AudioBox>) throws -> Bool
Parameters
selector
The selector of the desired property
-
Registers
block
to be performed whenselector
changesThrows
An error if the property listener could not be registeredDeclaration
Swift
public func whenSelectorChanges(_ selector: AudioObjectSelector<AudioBox>, perform block: PropertyChangeNotificationBlock?) throws
Parameters
selector
The selector of the desired property
block
A closure to invoke when the property changes or
nil
to remove the previous value