Classes
The following classes are available globally.
-
A class that calculates replay gain
See moreDeclaration
Objective-C
@interface SFBReplayGainAnalyzer : NSObject
-
An input source
See moreDeclaration
Objective-C
@interface SFBInputSource : NSObject
-
Class supporting commonly-used audio metadata and attached pictures
See moreDeclaration
Objective-C
@interface SFBAudioMetadata : NSObject <NSCopying>
-
Class providing information on basic audio properties
See moreDeclaration
Objective-C
@interface SFBAudioProperties : NSObject <NSCopying>
-
An output source
See moreDeclaration
Objective-C
@interface SFBOutputSource : NSObject
-
An audio player wrapping an \c AVAudioEngine processing graph supplied by \c SFBAudioPlayerNode
\c SFBAudioPlayer supports gapless playback for audio with the same sample rate and number of channels. For audio with different sample rates or channels, the audio processing graph is automatically reconfigured.
An \c SFBAudioPlayer may be in one of three playback states: playing, paused, or stopped. These states are based on whether the underlying \c AVAudioEngine is running (\c SFBAudioPlayer.engineIsRunning) and the \c SFBAudioPlayerNode is playing (\c SFBAudioPlayer.playerNodeIsPlaying).
\c SFBAudioPlayer supports delegate-based callbacks for the following events:
- Decoding started
- Decoding complete
- Decoding canceled
- Rendering will start
- Rendering started
- Rendering complete
- Now playing changed
- Playback state changed
- AVAudioEngineConfigurationChange notification received
- End of audio
- Asynchronous error encountered
The dispatch queue on which callbacks are performed is not specified.
See moreDeclaration
Objective-C
@interface SFBAudioPlayer : NSObject <SFBAudioPlayerNodeDelegate>
-
An \c AVAudioSourceNode supporting gapless playback for PCM formats
The output format of \c SFBAudioPlayerNode is specified at object initialization and cannot be changed. The output format must be the standard format, deinterleaved native-endian 32-bit floating point PCM, at any sample rate with any number of channels.
\c SFBAudioPlayerNode is supplied by objects implementing \c SFBPCMDecoding (decoders) and supports audio at the same sample rate and with the same number of channels as the output format. \c SFBAudioPlayerNode supports seeking when supported by the decoder.
\c SFBAudioPlayerNode maintains a current decoder and a queue of pending decoders. The current decoder is the decoder that will supply the earliest audio frame in the next render cycle when playing. Pending decoders are automatically dequeued and become current when the final frame of the current decoder is pushed in the render block.
\c SFBAudioPlayerNode decodes audio in a high priority (non-realtime) thread into a ring buffer and renders on demand. Rendering occurs in a realtime thread when the render block is called; the render block always supplies audio. When playback is paused or insufficient audio is available the render block outputs silence.
Since decoding and rendering are distinct operations performed in separate threads, a GCD timer on the background queue is used for garbage collection. This is necessary because state data created in the decoding thread needs to live until rendering is complete, which cannot occur until after decoding is complete.
\c SFBAudioPlayerNode supports delegate-based callbacks for the following events:
- Decoding started
- Decoding complete
- Decoding canceled
- Rendering will start
- Rendering started
- Rendering complete
- End of audio
All callbacks are performed on a dedicated notification queue.
See moreDeclaration
Objective-C
@interface SFBAudioPlayerNode : AVAudioSourceNode
-
A class encapsulating a single attached picture.
Most file formats may have more than one attached picture of each type.
See moreDeclaration
Objective-C
@interface SFBAttachedPicture : NSObject <NSCopying>
-
An audio converter converts audio from one format to another through a PCM intermediate format.
An audio converter reads PCM audio from an audio decoder in the decoder’s processing format, converts that audio to an intermediate PCM format, and then writes the intermediate PCM audio to an audio encoder which performs the final conversion to the desired format.
The decoder’s processing format and intermediate format must both be PCM but do not have to have the same sample rate, bit depth, channel count, or channel layout.
See moreAVAudioConverter
is used to convert from the decoder’s processing format to the intermediate format, performing sample rate conversion and channel mapping as required.Declaration
Objective-C
@interface SFBAudioConverter : NSObject
-
A decoder providing audio as PCM
See moreDeclaration
Objective-C
@interface SFBAudioDecoder : NSObject <SFBPCMDecoding>
-
An encoder consuming PCM audio
See moreDeclaration
Objective-C
@interface SFBAudioEncoder : NSObject <SFBPCMEncoding>
-
A class that exports audio using \c AVAudioFile
See moreDeclaration
Objective-C
@interface SFBAudioExporter : NSObject
-
An audio file containing properties (like channel count and sample rate) and metadata (like artist name and album title)
See moreDeclaration
Objective-C
@interface SFBAudioFile : NSObject
-
A decoder providing audio as DSD
See moreDeclaration
Objective-C
@interface SFBDSDDecoder : NSObject <SFBDSDDecoding>
-
A wrapper around a DSD decoder supporting DSD64 to PCM conversion
See moreDeclaration
Objective-C
@interface SFBDSDPCMDecoder : NSObject <SFBPCMDecoding>
-
A wrapper around a DSD decoder supporting DoP (DSD over PCM)
See moreDeclaration
Objective-C
@interface SFBDoPDecoder : NSObject <SFBPCMDecoding>
-
A class supporting a repeating segment of a decoder
See moreDeclaration
Objective-C
@interface SFBLoopableRegionDecoder : NSObject <SFBPCMDecoding>
-
A HAL audio aggregate device object
Remark
This class correponds to objects with the base classkAudioAggregateDeviceClassID
Declaration
Swift
public class AudioAggregateDevice : AudioDevice
-
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
Declaration
Swift
public class AudioBox : AudioObject
-
A HAL audio clock device object
This class has a single scope (
kAudioObjectPropertyScopeGlobal
) and a single element (kAudioObjectPropertyElementMaster
)Remark
This class correponds to objects with base classkAudioClockDeviceClassID
Declaration
Swift
public class AudioClockDevice : AudioObject
-
A HAL audio control object
This class has a single scope (
kAudioObjectPropertyScopeGlobal
) and a single element (kAudioObjectPropertyElementMaster
)Remark
This class correponds to objects with base classkAudioControlClassID
Declaration
Swift
public class AudioControl : AudioObject
-
A HAL audio device object
This class has four scopes (
kAudioObjectPropertyScopeGlobal
,kAudioObjectPropertyScopeInput
,kAudioObjectPropertyScopeOutput
, andkAudioObjectPropertyScopePlayThrough
), a master element (kAudioObjectPropertyElementMaster
), and an element for each channel in each streamRemark
This class correponds to objects with base classkAudioDeviceClassID
Declaration
Swift
public class AudioDevice : AudioObject
-
A HAL audio endpoint
Remark
This class correponds to objects with base classkAudioEndPointClassID
Declaration
Swift
public class AudioEndpoint : AudioDevice
-
A HAL audio endpoint device
Remark
This class correponds to objects with base classkAudioEndPointDeviceClassID
Declaration
Swift
public class AudioEndpointDevice : AudioDevice
-
A HAL audio object
See moreDeclaration
Swift
public class AudioObject : CustomDebugStringConvertible
extension AudioObject: Hashable
-
A HAL audio plug-in object
This class has a single scope (
kAudioObjectPropertyScopeGlobal
) and a single element (kAudioObjectPropertyElementMaster
)Remark
This class correponds to objects of typekAudioPlugInClassID
Declaration
Swift
public class AudioPlugIn : AudioObject
-
A HAL audio stream object
This class has a single scope (
kAudioObjectPropertyScopeGlobal
), a master element (kAudioObjectPropertyElementMaster
), and an element for each channelRemark
This class correponds to objects with base classkAudioStreamClassID
Declaration
Swift
public class AudioStream : AudioObject
-
A HAL audio subdevice
Remark
This class correponds to objects with base classkAudioSubDeviceClassID
Declaration
Swift
public class AudioSubdevice : AudioDevice
-
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 classkAudioSystemObjectClassID
Declaration
Swift
public class AudioSystemObject : AudioObject
-
A HAL audio transport manager object
This class has a single scope (
kAudioObjectPropertyScopeGlobal
) and a single element (kAudioObjectPropertyElementMaster
)Remark
This class correponds to objects with base classkAudioTransportManagerClassID
Declaration
Swift
public class AudioTransportManager : AudioPlugIn
-
A HAL audio boolean control object
Remark
This class correponds to objects with base classkAudioBooleanControlClassID
Declaration
Swift
public class BooleanControl : AudioControl
-
A HAL audio mute control object
Remark
This class correponds to objects with base classkAudioMuteControlClassID
Declaration
Swift
public class MuteControl : BooleanControl
-
A HAL audio solo control object
Remark
This class correponds to objects with base classkAudioSoloControlClassID
Declaration
Swift
public class SoloControl : BooleanControl
-
A HAL audio jack control object
Remark
This class correponds to objects with base classkAudioJackControlClassID
Declaration
Swift
public class JackControl : BooleanControl
-
A HAL audio LFE mute control object
Remark
This class correponds to objects with base classkAudioLFEMuteControlClassID
Declaration
Swift
public class LFEMuteControl : BooleanControl
-
A HAL audio phantom power control object
Remark
This class correponds to objects with base classkAudioPhantomPowerControlClassID
Declaration
Swift
public class PhantomPowerControl : BooleanControl
-
A HAL audio phase invert control object
Remark
This class correponds to objects with base classkAudioPhaseInvertControlClassID
Declaration
Swift
public class PhaseInvertControl : BooleanControl
-
A HAL audio clip light control object
Remark
This class correponds to objects with base classkAudioClipLightControlClassID
Declaration
Swift
public class ClipLightControl : BooleanControl
-
A HAL audio talkback control object
Remark
This class correponds to objects with base classkAudioTalkbackControlClassID
Declaration
Swift
public class TalkbackControl : BooleanControl
-
A HAL audio listenback control object
Remark
This class correponds to objects with base classkAudioListenbackControlClassID
Declaration
Swift
public class ListenbackControl : BooleanControl
-
A HAL audio level control object
Remark
This class correponds to objects with base classkAudioLevelControlClassID
Declaration
Swift
public class LevelControl : AudioControl
-
A HAL audio volume control object
Remark
This class correponds to objects with base classkAudioVolumeControlClassID
Declaration
Swift
public class VolumeControl : LevelControl
-
A HAL audio LFE volume control object
Remark
This class correponds to objects with base classkAudioLFEVolumeControlClassID
Declaration
Swift
public class LFEVolumeControl : LevelControl
-
A HAL audio selector control object
Remark
This class correponds to objects with base classkAudioSelectorControlClassID
Declaration
Swift
public class SelectorControl : AudioControl
-
A HAL audio data source control
Remark
This class correponds to objects with base classkAudioDataSourceControlClassID
Declaration
Swift
public class DataSourceControl : SelectorControl
-
A HAL audio data destination control
Remark
This class correponds to objects with base classkAudioDataDestinationControlClassID
Declaration
Swift
public class DataDestinationControl : SelectorControl
-
A HAL audio clock source control
Remark
This class correponds to objects with base classkAudioClockSourceControlClassID
Declaration
Swift
public class ClockSourceControl : SelectorControl
-
A HAL audio line level control
Remark
This class correponds to objects with base classkAudioLineLevelControlClassID
Declaration
Swift
public class LineLevelControl : SelectorControl
-
A HAL audio high pass filter control
Remark
This class correponds to objects with base classkAudioHighPassFilterControlClassID
Declaration
Swift
public class HighPassFilterControl : SelectorControl
-
A HAL audio slider control object
Remark
This class correponds to objects with base classkAudioSliderControlClassID
Declaration
Swift
public class SliderControl : AudioControl
-
A HAL audio stereo pan control object
Remark
This class correponds to objects with base classkAudioStereoPanControlClassID
Declaration
Swift
public class StereoPanControl : AudioControl