FWAUserLib.h

This header contains the C interface to the AppleFWAudio driver. The functions in this library allow applications to create and manage audio and MIDI streams and plugs, audio engines, and audio devices. In addition, this library can be used to implement mLAN support in macOS.

Overview

See the Overview section above for header-level documentation.

Overview

Included Headers

  • <IOKit/firewire/IOFireWireFamilyCommon.h>

  • <FWAUserLib/AppleFWAudioUserClientCommon.h>

Topics

Version 7

Version 6

func FWASetAutoLoad(FWARef!, Bool) -> OSStatus

Creates or removes the AppleFWAudio_Disable property in the I/O Registry.

Deprecated

Version 5

func FWADisposeIsochStream(FWARef!, FWAIsochStreamRef!) -> OSStatus

Destroys the isochronous stream reference.

Deprecated
func FWAGetClockSource(FWARef!, UnsafeMutablePointer<FWAIsochStreamRef?>!, UnsafeMutablePointer<UInt32>!) -> OSStatus

Returns the isochronous stream providing the clock (SYT) for the audio.

Deprecated
func FWAGetIsochStreamDirection(FWARef!, FWAIsochStreamRef!, UnsafeMutablePointer<FWAStreamDirection>!) -> OSStatus

Gets the stream direction of the specified isochronous stream reference.

Deprecated
func FWAGetIsochStreamState(FWARef!, FWAIsochStreamRef!, UnsafeMutablePointer<FWAStreamState>!) -> OSStatus

Gets the isochronous stream state of the specified isochronous stream reference.

Deprecated
func FWAGetMaxIsochChannels(FWARef!, UnsafeMutablePointer<UInt32>!, UnsafeMutablePointer<UInt32>!) -> OSStatus

Gets the maximum number of isochronous stream contexts the Macintosh can support.

Deprecated
func FWAGetMaxSequences(FWARef!, UnsafeMutablePointer<UInt32>!) -> OSStatus

Gets the maximum number of sequences the driver can support.

Deprecated
func FWASetClockSource(FWARef!, FWAIsochStreamRef!, UInt32) -> OSStatus

Sets the isochronous stream as the clock source.

Deprecated
func FWASetIsochStreamAudioSequenceCount(FWARef!, FWAIsochStreamRef!, UInt32) -> OSStatus

Changes the number of audio sequences in a FWAIsochStreamRef object.

Deprecated
func FWASetIsochStreamAudioType(FWARef!, FWAIsochStreamRef!, FWAudioType) -> OSStatus

Sets the audio type of the specified isochronous stream.

Deprecated
func FWASetIsochStreamChannelID(FWARef!, FWAIsochStreamRef!, UInt32) -> OSStatus

Sets the isochronous stream channel ID to the given value.

Deprecated
func FWASetIsochStreamOutputSpeed(FWARef!, FWAIsochStreamRef!, IOFWSpeed) -> OSStatus

Sets the speed of the specified isochronous output stream.

Deprecated
func FWASetIsochStreamSampleRate(FWARef!, FWAIsochStreamRef!, UInt32) -> OSStatus

Sets the sample rate of the specified isochronous stream.

Deprecated
func FWASyncUpDevice(FWARef!) -> OSStatus

Causes a notification to be sent to the driver that something may have changed externally and that the driver should resynchronize. This function is currently not used.

Deprecated

Version 3 (asynchronous MIDI functions)

func CreateAsyncWakePort(FWARef!, UnsafeMutablePointer<mach_port_t>!) -> OSStatus

Creates a port for asynchronous responses (most developers will not need to use this).

Deprecated
func FWAGetAEvntSource(FWARef!) -> CFRunLoopSource!

Gets the event source reference.

Deprecated
func FWAInitAEvntSource(FWARef!, UnsafeMutablePointer<Unmanaged<CFRunLoopSource>?>!, UnsafeMutableRawPointer!) -> OSStatus

Initializes the event source so asynchronous commands can send a notification to the CFRunLoop source.

Deprecated

Version 3

func FWADisposeAudioStream(FWARef!, UInt32) -> OSStatus

This function has been deprecated. Use FWADisposeFWAudioStream(_:_:) instead.

Deprecated
func FWAGetDeviceStatus(FWARef!, UnsafeMutableRawPointer!, UInt32) -> OSStatus

Returns a status structure containing device statistics (intended for diagnostic use).

Deprecated

Version 2

func FWAGetCycleTimeOffset(FWARef!, UnsafeMutablePointer<UInt32>!) -> OSStatus

Gets the cycle time offset the driver adds to the time stamp to compensate for delays in the packetizer.

Deprecated
func FWAGetNumAudioInputPlugs(FWARef!, UnsafeMutablePointer<UInt32>!) -> OSStatus

Gets the total number of audio input plugs to the device.

Deprecated
func FWAGetNumAudioOutputPlugs(FWARef!, UnsafeMutablePointer<UInt32>!) -> OSStatus

Gets the total number of audio output plugs to the device.

Deprecated
func FWAGetNumMIDIInputPlugs(FWARef!, UnsafeMutablePointer<UInt32>!) -> OSStatus

Gets the total number of MIDI input plugs of all MIDI streams attached to the device.

Deprecated
func FWAGetNumMIDIOutputPlugs(FWARef!, UnsafeMutablePointer<UInt32>!) -> OSStatus

Gets the total number of MIDI output plugs of all MIDI streams attached to the device.

Deprecated
func FWAIsMIDICapable(FWARef!, UnsafeMutablePointer<Bool>!) -> OSStatus

Returns whether the device is MIDI capable.

Deprecated
func FWASetCycleTimeOffset(FWARef!, UInt32) -> OSStatus

Sets the cycle time offset the driver should add to the time stamp to compensate for delays in the packetizer.

Deprecated
func FWASetNumMIDIInputPlugs(FWARef!, UInt32) -> OSStatus

Sets the number of MIDI input plugs of all MIDI streams attached to the device.

Deprecated
func FWASetNumMIDIOutputPlugs(FWARef!, UInt32) -> OSStatus

Sets the number of MIDI output plugs of all MIDI streams attached to the device.

Deprecated

Version 1 (mLAN support)

func FWACreateMIDIStream(FWARef!, UInt32, UInt32, UnsafeMutableRawPointer!, UInt32, UnsafeMutablePointer<UInt32>!) -> OSStatus

Creates a MIDI stream reference which allows MIDI to be sent and received via the FireWire device.

Deprecated
func FWADisposeMIDIStream(FWARef!, UInt32) -> OSStatus

Destroys a MIDI stream reference.

Deprecated
func FWAGetGUID(FWARef!, UnsafeMutablePointer<UInt64>!) -> OSStatus

Returns the device's globally unique ID (GUID).

Deprecated
func FWAGetMacGUID(FWARef!, UnsafeMutablePointer<UInt64>!) -> OSStatus

Returns the Macintosh computer's globally unique ID (GUID).

Deprecated
func FWAGetNodeID(FWARef!, UnsafeMutablePointer<UInt32>!, UnsafeMutablePointer<UInt32>!) -> OSStatus

Returns the node ID of the passed-in FWARef device reference.

Deprecated
func FWAReadQuadlet(FWARef!, FWAddressPtr!, UnsafeMutablePointer<UInt32>!) -> OSStatus

Reads a quadlet at the specified FireWire address.

Deprecated
func FWAWriteBlock(FWARef!, FWAddressPtr!, UInt32, UnsafePointer<UInt8>!) -> OSStatus

Writes a block of data to the specified FireWire address.

Deprecated
func FWAWriteQuadlet(FWARef!, FWAddressPtr!, UInt32) -> OSStatus

Writes a quadlet to the specified FireWire address.

Deprecated

Version 1

func FWAClose(FWARef!) -> OSStatus

Closes the connection that was made to the device with FWAOpen(_:_:).

Deprecated
func FWACountDevices(UnsafeMutablePointer<UInt16>!, UnsafeMutablePointer<UInt16>!) -> OSStatus

Returns the number of AppleFWAudio devices connected to the system and their node IDs.

Deprecated
func FWAOpen(UInt32, UnsafeMutablePointer<FWARef?>!) -> OSStatus

Opens a user client connection to the AppleFWAudio driver.

Deprecated
func FWAOpenLocal(UnsafeMutablePointer<FWARef?>!) -> OSStatus

Opens a connection to the FireWire audio service that is attached to the Macintosh local FireWire node.

Deprecated