AudioStream
public class AudioStream : AudioObject
A HAL audio stream object
This class has a single scope (kAudioObjectPropertyScopeGlobal), a master element (kAudioObjectPropertyElementMaster), and an element for each channel
Remark
This class correponds to objects with base classkAudioStreamClassID
-
Undocumented
Declaration
Swift
public override var debugDescription: String { get } -
Returns
trueif the stream is activeRemark
This corresponds to the propertykAudioStreamPropertyIsActiveDeclaration
Swift
public func isActive() throws -> Bool -
Returns
trueifselfis an output streamRemark
This corresponds to the propertykAudioStreamPropertyDirectionDeclaration
Swift
public func direction() throws -> Bool -
Returns the terminal type
Remark
This corresponds to the propertykAudioStreamPropertyTerminalTypeDeclaration
Swift
public func terminalType() throws -> TerminalType -
Returns the starting channel
Remark
This corresponds to the propertykAudioStreamPropertyStartingChannelDeclaration
Swift
public func startingChannel() throws -> PropertyElement -
Returns the latency
Remark
This corresponds to the propertykAudioStreamPropertyLatencyDeclaration
Swift
public func latency() throws -> UInt32 -
Returns the virtual format
Remark
This corresponds to the propertykAudioStreamPropertyVirtualFormatDeclaration
Swift
public func virtualFormat() throws -> AudioStreamBasicDescription -
Sets the virtual format
Remark
This corresponds to the propertykAudioStreamPropertyVirtualFormatDeclaration
Swift
public func setVirtualFormat(_ value: AudioStreamBasicDescription) throws -
Returns the available virtual formats
Remark
This corresponds to the propertykAudioStreamPropertyAvailableVirtualFormatsDeclaration
Swift
public func availableVirtualFormats() throws -> [(AudioStreamBasicDescription, ClosedRange<Double>)] -
Returns the physical format
Remark
This corresponds to the propertykAudioStreamPropertyPhysicalFormatDeclaration
Swift
public func physicalFormat() throws -> AudioStreamBasicDescription -
Sets the physical format
Remark
This corresponds to the propertykAudioStreamPropertyPhysicalFormatDeclaration
Swift
public func setPhysicalFormat(_ value: AudioStreamBasicDescription) throws -
Returns the available physical formats
Remark
This corresponds to the propertykAudioStreamPropertyAvailablePhysicalFormatsDeclaration
Swift
public func availablePhysicalFormats() throws -> [(AudioStreamBasicDescription, ClosedRange<Double>)] -
A thin wrapper around a HAL audio stream terminal type
See moreDeclaration
Swift
public struct TerminalType : RawRepresentable, ExpressibleByIntegerLiteral, ExpressibleByStringLiteralextension AudioStream.TerminalType: CustomDebugStringConvertible -
Returns
trueifselfhasselectorDeclaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<AudioStream>) -> BoolParameters
selectorThe selector of the desired property
-
Returns
trueifselectoris settableThrows
An error ifselfdoes not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<AudioStream>) 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<AudioStream>, 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
AudioStream Class Reference