AudioSystemObject
public class AudioSystemObject : AudioObject
The HAL audio system object
This class has a single scope (kAudioObjectPropertyScopeGlobal) and a single element (kAudioObjectPropertyElementMaster)
Remark
This class correponds to the object with idkAudioObjectSystemObject and class kAudioSystemObjectClassID
-
The singleton audio system object
Declaration
Swift
public static var instance: AudioSystemObject -
Returns the
AudioObjectIDfor the audio device withuidornilif unknownRemark
This corresponds to the propertykAudioHardwarePropertyTranslateUIDToDeviceDeclaration
Swift
public func deviceID(forUID uid: String) throws -> AudioObjectID?Parameters
uidThe UID of the desired device
-
Returns
trueif audio devices should mix stereo to monoRemark
This corresponds to the propertykAudioHardwarePropertyMixStereoToMonoDeclaration
Swift
public func mixStereoToMono() throws -> Bool -
Sets whether audio devices should mix stereo to mono
Remark
This corresponds to the propertykAudioHardwarePropertyMixStereoToMonoDeclaration
Swift
public func setMixStereoToMono(_ value: Bool) throws -
Returns the
AudioObjectIDfor the audio plug-in forbundleIDornilif unknownRemark
This corresponds to the propertykAudioHardwarePropertyTranslateBundleIDToPlugInDeclaration
Swift
public func plugInID(forBundleID bundleID: String) throws -> AudioObjectID?Parameters
uidThe bundle ID of the desired plug-in
-
Returns the
AudioObjectIDfor the audio transport manager forbundleIDornilif unknownRemark
This corresponds to the propertykAudioHardwarePropertyTranslateBundleIDToTransportManagerDeclaration
Swift
public func transportManagerID(forBundleID bundleID: String) throws -> AudioObjectID?Parameters
uidThe bundle ID of the desired transport manager
-
Returns the
AudioObjectIDfor the audio box withuidornilif unknownRemark
This corresponds to the propertykAudioHardwarePropertyTranslateUIDToBoxDeclaration
Swift
public func boxID(forUID uid: String) throws -> AudioObjectID?Parameters
uidThe UID of the desired box
-
Returns the
AudioObjectIDfor the audio clock device withuidornilif unknownRemark
This corresponds to the propertykAudioHardwarePropertyTranslateUIDToClockDeviceDeclaration
Swift
public func clockDeviceID(forUID uid: String) throws -> AudioObjectID?Parameters
uidThe UID of the desired clock device
-
Returns
trueif the current process contains the master HAL instanceRemark
This corresponds to the propertykAudioHardwarePropertyProcessIsMasterDeclaration
Swift
public func processIsMaster() throws -> Bool -
Returns
trueif the HAL is initing or exiting the processRemark
This corresponds to the propertykAudioHardwarePropertyIsInitingOrExitingDeclaration
Swift
public func isInitingOrExiting() throws -> Bool -
Informs the HAL the effective user id of the process has changed
Remark
This corresponds to the propertykAudioHardwarePropertyUserIDChangedDeclaration
Swift
public func setUserIDChanged() throws -
Returns
trueif the process will be heardRemark
This corresponds to the propertykAudioHardwarePropertyProcessIsAudibleDeclaration
Swift
public func processIsAudible() throws -> Bool -
Sets whether the process is audible
Remark
This corresponds to the propertykAudioHardwarePropertyProcessIsAudibleDeclaration
Swift
public func setProcessIsAudible(_ value: Bool) throws -
Returns
trueif the process will allow the CPU to sleep while audio IO is in progressRemark
This corresponds to the propertykAudioHardwarePropertySleepingIsAllowedDeclaration
Swift
public func sleepingIsAllowed() throws -> Bool -
Sets whether the process will allow the CPU to sleep while audio IO is in progress
Remark
This corresponds to the propertykAudioHardwarePropertySleepingIsAllowedDeclaration
Swift
public func setSleepingIsAllowed(_ value: Bool) throws -
Returns
trueif the process should be unloaded after a period of inactivityRemark
This corresponds to the propertykAudioHardwarePropertyUnloadingIsAllowedDeclaration
Swift
public func unloadingIsAllowed() throws -> Bool -
Sets whether the process should be unloaded after a period of inactivity
Remark
This corresponds to the propertykAudioHardwarePropertyUnloadingIsAllowedDeclaration
Swift
public func setUnloadingIsAllowed(_ value: Bool) throws -
Returns
trueif the HAL should automatically take hog mode on behalf of the processRemark
This corresponds to the propertykAudioHardwarePropertyHogModeIsAllowedDeclaration
Swift
public func hogModeIsAllowed() throws -> Bool -
Sets whether the HAL should automatically take hog mode on behalf of the process
Remark
This corresponds to the propertykAudioHardwarePropertyHogModeIsAllowedDeclaration
Swift
public func setHogModeIsAllowed(_ value: Bool) throws -
Returns
trueif the login session of the user is a console or headless sessionRemark
This corresponds to the propertykAudioHardwarePropertyUserSessionIsActiveOrHeadlessDeclaration
Swift
public func userSessionIsActiveOrHeadless() throws -> Bool -
Returns the power hint
Remark
This corresponds to the propertykAudioHardwarePropertyPowerHintDeclaration
Swift
public func powerHint() throws -> AudioHardwarePowerHint -
Sets the power hint
Remark
This corresponds to the propertykAudioHardwarePropertyPowerHintDeclaration
Swift
public func setPowerHint(_ value: AudioHardwarePowerHint) throws -
Returns
trueifselfhasselectorDeclaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<AudioSystemObject>) -> BoolParameters
selectorThe selector of the desired property
-
Returns
trueifselectoris settableThrows
An error ifselfdoes not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<AudioSystemObject>) 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<AudioSystemObject>, 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
AudioSystemObject Class Reference