### Start Playback Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayer.html Starts the underlying AVAudioEngine and plays the SFBAudioPlayerNode. Has no effect if the player is already playing. ```Objective-C - (BOOL)playReturningError:(NSError *_Nullable *_Nullable)error; ``` -------------------------------- ### Get AudioStream Starting Channel Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioStream.html Returns the starting channel for the audio stream. This corresponds to the kAudioStreamPropertyStartingChannel property. ```swift public func startingChannel() throws -> PropertyElement ``` -------------------------------- ### SFBAudioDecoding Setup and Teardown Source: https://sbooth.github.io/SFBAudioEngine/Protocols/SFBAudioDecoding.html Methods for opening and closing the audio decoder, and checking its open state. ```APIDOC ## Setup and Teardown ### -openReturningError: Opens the decoder for reading. #### Declaration ```objectivec - (BOOL)openReturningError:(NSError *_Nullable *_Nullable)error; ``` #### Parameters ` _error_ ` | An optional pointer to an `NSError` object to receive error information #### Return Value `YES` on success, `NO` otherwise ### -closeReturningError: Closes the decoder. #### Declaration ```objectivec - (BOOL)closeReturningError:(NSError *_Nullable *_Nullable)error; ``` #### Parameters ` _error_ ` | An optional pointer to an `NSError` object to receive error information #### Return Value `YES` on success, `NO` otherwise ``` -------------------------------- ### Play Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayer.html Starts the underlying AVAudioEngine and plays the SFBAudioPlayerNode. Has no effect if the player is already playing. ```APIDOC ## playReturningError: ### Description Starts the underlying `AVAudioEngine` and plays the `SFBAudioPlayerNode`. If the current `playbackState` is `SFBAudioPlayerPlaybackStatePlaying`, this method has no effect. ### Method - (BOOL)playReturningError:(NSError *_Nullable *_Nullable)error; ### Parameters - **error** (NSError *_Nullable *_Nullable) - Optional - An optional pointer to an `NSError` object to receive error information. ### Return Value - (BOOL) - YES if the underlying `AVAudioEngine` was successfully started. ``` -------------------------------- ### Start Playback Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayerNode.html Begins pushing audio data from the current decoder. Ensure a decoder is enqueued and ready before calling. ```Objective-C - (void)play; ``` -------------------------------- ### Build All SFBAudioEngine Frameworks Source: https://sbooth.github.io/SFBAudioEngine/index.html Run 'make' without arguments to build all available framework products, including XCFrameworks. ```bash make ``` -------------------------------- ### instance Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioSystemObject.html Access the singleton audio system object. ```APIDOC ## instance ### Description Access the singleton audio system object. ### Declaration Swift ```swift public static var instance: AudioSystemObject ``` ``` -------------------------------- ### Get Length Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBInputSource.html Returns the length of the input, in bytes. ```APIDOC ## - getLength:error: ### Description Returns the length of the input, in bytes. ### Declaration Objective-C ``` - (BOOL)getLength:(nonnull NSInteger *)length error:(NSError *_Nullable *_Nullable)error; ``` ``` -------------------------------- ### -initWithURL:error: Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBDoPDecoder.html Initializes an SFBDoPDecoder object for the given URL. Returns nil on failure. ```APIDOC ## -initWithURL:error: ### Description Returns an initialized `SFBDoPDecoder` object for the given URL or `nil` on failure. ### Method - (nullable instancetype)initWithURL:(nonnull NSURL *)url error:(NSError *_Nullable *_Nullable)error; ### Parameters #### Path Parameters - **url** (NSURL *) - Required - The URL - **error** (NSError **) - Optional - An optional pointer to a `NSError` to receive error information ### Return Value An initialized `SFBDoPDecoder` object for the specified URL, or `nil` on failure. ``` -------------------------------- ### -initWithInputSource:error: Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBDoPDecoder.html Initializes an SFBDoPDecoder object for the given input source. Returns nil on failure. ```APIDOC ## -initWithInputSource:error: ### Description Returns an initialized `SFBDoPDecoder` object for the given input source or `nil` on failure. ### Method - (nullable instancetype) initWithInputSource:(nonnull SFBInputSource *)inputSource error:(NSError *_Nullable *_Nullable)error; ### Parameters #### Path Parameters - **inputSource** (SFBInputSource *) - Required - The input source - **error** (NSError **) - Optional - An optional pointer to a `NSError` to receive error information ### Return Value An initialized `SFBDoPDecoder` object for the specified input source, or `nil` on failure. ``` -------------------------------- ### rating Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the rating for the audio metadata. ```APIDOC ## rating ### Description Represents the rating for the audio metadata. ### Method Swift ### Endpoint public var rating: Int? { get set } ``` -------------------------------- ### Initialize With URL Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioFile.html Returns an initialized SFBAudioFile object for the given URL. Does not read audio properties or metadata. ```APIDOC ## initWithURL: ### Description Returns an initialized \c SFBAudioFile object for the given URL or \c nil on failure. Note Does not read audio properties or metadata ### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url; ``` ### Parameters - **url** (NSURL *) - The URL. ``` -------------------------------- ### kindOfItem Source: https://sbooth.github.io/SFBAudioEngine/Classes/SelectorControl.html Gets the kind of a specific item ID. ```APIDOC ## kindOfItem ### Description Returns the kind of `itemID`. ### Method Swift ### Endpoint N/A ### Parameters #### Path Parameters - **itemID** (UInt32) - Required - The ID of the item to get the kind for. ### Response #### Success Response - **UInt32** - The kind of the item. ### Response Example ```json { "example": "1" } ``` ``` -------------------------------- ### Notify Rendering Started Source: https://sbooth.github.io/SFBAudioEngine/Protocols/SFBAudioPlayerNodeDelegate.html Called when the first audio frame is being rendered. Do not modify the decoder properties. ```Objective-C - (void)audioPlayerNode:(nonnull SFBAudioPlayerNode *)audioPlayerNode renderingStarted:(nonnull id)decoder; ``` -------------------------------- ### Get Power Hint Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioSystemObject.html Retrieve the current power hint for the audio system. Corresponds to kAudioHardwarePropertyPowerHint. ```Swift public func powerHint() throws -> AudioHardwarePowerHint ``` -------------------------------- ### Initialization Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayerNode.html Initializes an SFBAudioPlayerNode. Use the appropriate initializer based on your needs. ```APIDOC ## Initializers ### -init Returns an initialized SFBAudioPlayerNode object for stereo audio at 44,100 Hz. #### Declaration Objective-C ``` - (nonnull instancetype)init; ``` ### -initWithSampleRate:channels: Returns an initialized SFBAudioPlayerNode object for audio with a specified number of channels and sample rate. #### Declaration Objective-C ``` - (nonnull instancetype)initWithSampleRate:(double)sampleRate channels:(AVAudioChannelCount)channels; ``` #### Parameters ` _sampleRate_ ` | The sample rate supplied by the render block ---|--- ` _channels_ ` | The number of channels supplied by the render block #### Return Value An initialized SFBAudioPlayerNode object or nil if memory or resource allocation failed. ### -initWithFormat: Returns an initialized SFBAudioPlayerNode object. Note `format` must be standard. #### Declaration Objective-C ``` - (nonnull instancetype)initWithFormat:(nonnull AVAudioFormat *)format; ``` #### Parameters ` _format_ ` | The format supplied by the render block ---|--- #### Return Value An initialized SFBAudioPlayerNode object or nil if memory or resource allocation failed. ``` -------------------------------- ### Get Layout Bitmap Source: https://sbooth.github.io/SFBAudioEngine/Structs/AudioChannelLayoutWrapper.html Returns the layout's mAudioChannelBitmap. ```swift public var bitmap: AudioChannelBitmap { get } ``` -------------------------------- ### Get Layout Tag Source: https://sbooth.github.io/SFBAudioEngine/Structs/AudioChannelLayoutWrapper.html Returns the layout's mAudioChannelLayoutTag. ```swift public var tag: AudioChannelLayoutTag { get } ``` -------------------------------- ### Build iOS Framework Source: https://sbooth.github.io/SFBAudioEngine/index.html Use the Makefile to build the iOS framework. This command creates a build product for iOS. ```bash make build/iOS.xcarchive ``` -------------------------------- ### audioPlayer:renderingWillStart:atHostTime: Source: https://sbooth.github.io/SFBAudioEngine/Protocols/SFBAudioPlayerDelegate.html Called to notify the delegate that audio will soon begin rendering. Warning: Do not change any properties of the decoder. ```APIDOC ## audioPlayer:renderingWillStart:atHostTime: ### Description Called to notify the delegate that audio will soon begin rendering. ### Warning Do not change any properties of `decoder`. ### Declaration Objective-C ``` - (void)audioPlayer:(nonnull SFBAudioPlayer *)audioPlayer renderingWillStart:(nonnull id)decoder atHostTime:(uint64_t)hostTime; ``` ### Parameters - `_audioPlayer_` (nonnull SFBAudioPlayer *) - The `SFBAudioPlayer` object processing `decoder`. - `_decoder_` (nonnull id) - The decoder for which rendering is about to start. - `_hostTime_` (uint64_t) - The host time at which the first audio frame from `decoder` will reach the device. ``` -------------------------------- ### Get Offset Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBInputSource.html Returns the current offset in the input, in bytes. ```APIDOC ## - getOffset:error: ### Description Returns the current offset in the input, in bytes. ### Declaration Objective-C ``` - (BOOL)getOffset:(nonnull NSInteger *)offset error:(NSError *_Nullable *_Nullable)error; ``` ``` -------------------------------- ### Get Device List Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioBox.html Retrieves a list of audio devices provided by the audio box. ```APIDOC ## deviceList() ### Description Returns the audio devices provided by the box. ### Method `public func deviceList() throws -> [AudioDevice]` ``` -------------------------------- ### Initialize With URL and Error Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioFile.html Returns an initialized SFBAudioFile object for the given URL. Does not read audio properties or metadata. ```APIDOC ## initWithURL:error: ### Description Returns an initialized \c SFBAudioFile object for the given URL or \c nil on failure. Note Does not read audio properties or metadata ### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url error:(NSError *_Nullable *_Nullable)error; ``` ### Parameters - **url** (NSURL *) - The URL. - **error** (NSError ** _Nullable *) - An optional pointer to a \c NSError to receive error information. ### Return Value An initialized \c SFBAudioFile object for the specified URL, or \c nil on failure. ``` -------------------------------- ### discNumber Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the disc number for the audio metadata. ```APIDOC ## discNumber ### Description Represents the disc number for the audio metadata. ### Method Swift ### Endpoint public var discNumber: Int? { get set } ``` -------------------------------- ### Initialize SFBAudioFile from URL and Format Name (No Properties/Metadata) Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioFile.html Initialize an SFBAudioFile object with a URL and format name. Does not read audio properties or metadata. ```Objective-C - (nullable instancetype)initWithURL:(nonnull NSURL *)url formatName:(nonnull SFBAudioFileFormatName)formatName; ``` -------------------------------- ### trackNumber Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the track number for the audio metadata. ```APIDOC ## trackNumber ### Description Represents the track number for the audio metadata. ### Method Swift ### Endpoint public var trackNumber: Int? { get set } ``` -------------------------------- ### Initialize SFBAudioFile from URL, Format Name, and Error Handling (No Properties/Metadata) Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioFile.html Initialize an SFBAudioFile object with a URL, format name, and error handling. Does not read audio properties or metadata. ```Objective-C - (nullable instancetype)initWithURL:(nonnull NSURL *)url formatName:(nonnull SFBAudioFileFormatName)formatName error:(NSError *_Nullable *_Nullable)error; ``` -------------------------------- ### compilation Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the compilation flag for the audio metadata. ```APIDOC ## compilation ### Description Represents the compilation flag for the audio metadata. ### Method Swift ### Endpoint public var compilation: Bool? { get set } ``` -------------------------------- ### playURL:error: Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayer.html Cancels the current decoder, clears any queued decoders, creates and enqueues a decoder, and starts playback. ```APIDOC ## playURL:error: ### Description Cancels the current decoder, clears any queued decoders, creates and enqueues a decoder, and starts playback. Note This is equivalent to -enqueueURL:forImmediatePlayback:error: with YES for forImmediatePlayback followed by -playReturningError: ### Method - (BOOL)playURL:(nonnull NSURL *)url error:(NSError *_Nullable *_Nullable)error; ### Parameters - **url** (NSURL *) - The URL to play - **error** (NSError **) - An optional pointer to an NSError object to receive error information ### Return Value YES if a decoder was created and enqueued and playback started successfully ``` -------------------------------- ### Notify when rendering starts Source: https://sbooth.github.io/SFBAudioEngine/Protocols/SFBAudioPlayerDelegate.html Called when the first audio frame begins rendering. Do not modify the decoder properties. ```Objective-C - (void)audioPlayer:(nonnull SFBAudioPlayer *)audioPlayer renderingStarted:(nonnull id)decoder; ``` -------------------------------- ### nameOfItem Source: https://sbooth.github.io/SFBAudioEngine/Classes/SelectorControl.html Gets the name associated with a specific item ID. ```APIDOC ## nameOfItem ### Description Returns the name of `itemID`. ### Method Swift ### Endpoint N/A ### Parameters #### Path Parameters - **itemID** (UInt32) - Required - The ID of the item to get the name for. ### Response #### Success Response - **String** - The name of the item. ### Response Example ```json { "example": "Item Name" } ``` ``` -------------------------------- ### Build iOS Simulator Framework Source: https://sbooth.github.io/SFBAudioEngine/index.html Use the Makefile to build the iOS Simulator framework. This command creates a build product for the iOS Simulator. ```bash make build/iOS-Simulator.xcarchive ``` -------------------------------- ### Get Channel Descriptions Source: https://sbooth.github.io/SFBAudioEngine/Structs/AudioChannelLayoutWrapper.html Returns the layout's mChannelDescriptions as an UnsafeBufferPointer. ```swift public var channelDescriptions: UnsafeBufferPointer { get } ``` -------------------------------- ### Initialization with URL Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBDSDDecoder.html Methods to initialize an SFBDSDDecoder object using a URL. ```APIDOC ## Initialization ### `-initWithURL:` Returns an initialized `SFBDSDDecoder` object for the given URL or `nil` on failure. #### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url; ``` #### Parameters `_url_` | The URL #### Return Value An initialized `SFBDSDDecoder` object for the specified URL, or `nil` on failure. ### `-initWithURL:error:` Returns an initialized `SFBDSDDecoder` object for the given URL or `nil` on failure. #### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url error:(NSError *_Nullable *_Nullable)error; ``` #### Parameters `_url_` | The URL `_error_` | An optional pointer to a `NSError` to receive error information #### Return Value An initialized `SFBDSDDecoder` object for the specified URL, or `nil` on failure. ### `-initWithURL:mimeType:error:` Returns an initialized `SFBDSDDecoder` object for the given URL or `nil` on failure. #### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url mimeType:(nullable NSString *)mimeType error:(NSError *_Nullable *_Nullable)error; ``` #### Parameters `_url_` | The URL `_mimeType_` | The MIME type of `url` or `nil` `_error_` | An optional pointer to a `NSError` to receive error information #### Return Value An initialized `SFBDSDDecoder` object for the specified URL, or `nil` on failure. ### `-initWithURL:decoderName:` Returns an initialized `SFBDSDDecoder` object for the given URL or `nil` on failure. #### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url decoderName:(nonnull SFBDSDDecoderName)decoderName; ``` #### Parameters `_url_` | The URL `_decoderName_` | The name of the decoder to use ``` -------------------------------- ### Get Number of Channel Descriptions Source: https://sbooth.github.io/SFBAudioEngine/Structs/AudioChannelLayoutWrapper.html Returns the layout's mNumberChannelDescriptions. ```swift public var numberChannelDescriptions: UInt32 { get } ``` -------------------------------- ### Initialize With URL and Format Name Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioFile.html Returns an initialized SFBAudioFile object for the specified URL. Does not read audio properties or metadata. ```APIDOC ## initWithURL:formatName: ### Description Returns an initialized \c SFBAudioFile object for the specified URL. Note Does not read audio properties or metadata ### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url formatName:(nonnull SFBAudioFileFormatName)formatName; ``` ### Parameters - **url** (NSURL *) - The URL. - **formatName** (SFBAudioFileFormatName) - The name of the format to use. ``` -------------------------------- ### Get AudioChannelLabel Name Source: https://sbooth.github.io/SFBAudioEngine/Extensions/AudioChannelLabel.html Retrieves the name of an AudioChannelLabel. This property is read-only. ```swift public var channelLabelName: String { get } ``` -------------------------------- ### Initialize With URL, Format Name, and Error Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioFile.html Returns an initialized SFBAudioFile object for the specified URL. Does not read audio properties or metadata. ```APIDOC ## initWithURL:formatName:error: ### Description Returns an initialized \c SFBAudioFile object for the specified URL. Note Does not read audio properties or metadata ### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url formatName:(nonnull SFBAudioFileFormatName)formatName error:(NSError *_Nullable *_Nullable)error; ``` ### Parameters - **url** (NSURL *) - The URL. - **formatName** (SFBAudioFileFormatName) - The name of the format to use. - **error** (NSError ** _Nullable *) - An optional pointer to a \c NSError to receive error information. ### Return Value An initialized \c SFBAudioFile object for the specified URL, or \c nil on failure. ``` -------------------------------- ### discTotal Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the total number of discs for the audio metadata. ```APIDOC ## discTotal ### Description Represents the total number of discs for the audio metadata. ### Method Swift ### Endpoint public var discTotal: Int? { get set } ``` -------------------------------- ### trackTotal Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the total number of tracks for the audio metadata. ```APIDOC ## trackTotal ### Description Represents the total number of tracks for the audio metadata. ### Method Swift ### Endpoint public var trackTotal: Int? { get set } ``` -------------------------------- ### Build SFBAudioEngine XCFrameworks Source: https://sbooth.github.io/SFBAudioEngine/index.html Navigate into the cloned directory and build the XCFrameworks using the provided Makefile. This command builds all necessary framework products. ```bash cd SFBAudioEngine make -C XCFrameworks ``` -------------------------------- ### make Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioObject.html Creates and returns an initialized AudioObject. Whenever possible, this will return a specialized subclass exposing additional functionality. ```APIDOC ## make ### Description Creates and returns an initialized `AudioObject`. Whenever possible, this will return a specialized subclass exposing additional functionality. ### Precondition `objectID` != `kAudioObjectUnknown` ### Method Swift ### Signature `public class func make(_ objectID: AudioObjectID) -> AudioObject` ### Parameters #### Path Parameters - **objectID** (AudioObjectID) - The audio object ID ``` -------------------------------- ### Get Playback Position and Time Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayerNode.html Retrieves the playback position and time. ```APIDOC ## getPlaybackPosition:andTime: ### Description Retrieves the playback position and time. ### Method - (BOOL)getPlaybackPosition:(nullable SFBAudioPlayerNodePlaybackPosition *)playbackPosition andTime:(nullable SFBAudioPlayerNodePlaybackTime *)playbackTime; ### Parameters #### Path Parameters - **playbackPosition** (SFBAudioPlayerNodePlaybackPosition) - Optional - An optional pointer to an SFBAudioPlayerNodePlaybackPosition struct to receive playback position information. - **playbackTime** (SFBAudioPlayerNodePlaybackTime) - Optional - An optional pointer to an SFBAudioPlayerNodePlaybackTime struct to receive playback time information. ### Return Value - (BOOL) - NO if the current decoder is nil. ``` -------------------------------- ### Initialize with URL and Loop Parameters Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBLoopableRegionDecoder.html Initializes the decoder with a URL, specifying the start frame position, frame length, and repeat count for the loop. Use this when initializing from a file URL. ```Objective-C - (nullable instancetype)initWithURL:(nonnull NSURL *)url framePosition:(AVAudioFramePosition)framePosition frameLength:(AVAudioFramePosition)frameLength error:(NSError *_Nullable *_Nullable)error; ``` ```Objective-C - (nullable instancetype)initWithURL:(nonnull NSURL *)url framePosition:(AVAudioFramePosition)framePosition frameLength:(AVAudioFramePosition)frameLength repeatCount:(NSInteger)repeatCount error:(NSError *_Nullable *_Nullable)error; ``` -------------------------------- ### Get Audio File URL Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioFile.html Retrieve the URL of the audio file. ```Objective-C - (NSURL *_Nullable)url; ``` -------------------------------- ### -initWithDecoder:error: Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBDoPDecoder.html Initializes an SFBDoPDecoder object for the given decoder. Returns nil on failure. ```APIDOC ## -initWithDecoder:error: ### Description Returns an initialized `SFBDoPDecoder` object for the given decoder or `nil` on failure. ### Method - (nullable instancetype)initWithDecoder:(nonnull id)decoder error:(NSError *_Nullable *_Nullable)error; ### Parameters #### Path Parameters - **decoder** (id) - Required - The decoder - **error** (NSError **) - Optional - An optional pointer to a `NSError` to receive error information ### Return Value An initialized `SFBDoPDecoder` object for the specified decoder, or `nil` on failure. ``` -------------------------------- ### Decibel Value Source: https://sbooth.github.io/SFBAudioEngine/Classes/LevelControl.html Get or set the control's decibel value. ```APIDOC ## decibelValue() ### Description Returns the control’s decibel value. ### Method GET ### Endpoint `/LevelControl/decibelValue` ### Response #### Success Response (200) - **value** (Float) - The decibel value of the control. ## setDecibelValue(_:) ### Description Sets the control’s decibel value. ### Method POST ### Endpoint `/LevelControl/setDecibelValue` ### Parameters #### Request Body - **value** (Float) - Required - The decibel value to set. ``` -------------------------------- ### audioPlayerNode:renderingWillStart:atHostTime: Source: https://sbooth.github.io/SFBAudioEngine/Protocols/SFBAudioPlayerNodeDelegate.html Called to notify the delegate that audio will soon begin rendering. Warning: Do not change any properties of the decoder. ```APIDOC ## audioPlayerNode:renderingWillStart:atHostTime: ### Description Called to notify the delegate that audio will soon begin rendering. ### Warning Do not change any properties of `decoder`. ### Declaration Objective-C ``` - (void)audioPlayerNode:(nonnull SFBAudioPlayerNode *)audioPlayerNode renderingWillStart:(nonnull id)decoder atHostTime:(uint64_t)hostTime; ``` ### Parameters - `_audioPlayerNode_` (SFBAudioPlayerNode): The `SFBAudioPlayerNode` object processing `decoder`. - `_decoder_` (id): The decoder for which rendering is about to start. - `_hostTime_` (uint64_t): The host time at which the first audio frame from `decoder` will reach the device. ``` -------------------------------- ### Scalar Value Source: https://sbooth.github.io/SFBAudioEngine/Classes/LevelControl.html Get or set the control's scalar value. ```APIDOC ## scalarValue() ### Description Returns the control’s scalar value. ### Method GET ### Endpoint `/LevelControl/scalarValue` ### Response #### Success Response (200) - **value** (Float) - The scalar value of the control. ## setScalarValue(_:) ### Description Sets the control’s scalar value. ### Method POST ### Endpoint `/LevelControl/setScalarValue` ### Parameters #### Request Body - **value** (Float) - Required - The scalar value to set. ``` -------------------------------- ### Get Transport Type Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioBox.html Retrieves the transport type of the audio box. ```APIDOC ## transportType() ### Description Returns the transport type. ### Method `public func transportType() throws -> AudioDevice.TransportType` ``` -------------------------------- ### Build macOS Framework Source: https://sbooth.github.io/SFBAudioEngine/index.html Use the Makefile to build the macOS framework. This command creates a build product for macOS. ```bash make build/macOS.xcarchive ``` -------------------------------- ### Initialize With URL, MIME Type, and Error Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioFile.html Returns an initialized SFBAudioFile object for the given URL. Does not read audio properties or metadata. ```APIDOC ## initWithURL:mimeType:error: ### Description Returns an initialized \c SFBAudioFile object for the given URL or \c nil on failure. ### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url mimeType:(nullable NSString *)mimeType error:(NSError *_Nullable *_Nullable)error; ``` ### Parameters - **url** (NSURL *) - The URL. - **mimeType** (NSString * _Nullable) - The MIME type of \c url or \c nil. - **error** (NSError ** _Nullable *) - An optional pointer to a \c NSError to receive error information. ### Return Value An initialized \c SFBAudioFile object for the specified URL, or \c nil on failure. ``` -------------------------------- ### Volume Control Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayer.html Methods for getting and setting the volume for a specific audio channel. ```APIDOC ## volumeForChannel: ### Description Returns the volume for a given channel on the `AVAudioEngine.outputNode.audioUnit`. ### Method - (float)volumeForChannel:(AudioObjectPropertyElement)channel; ### Parameters - **channel** (AudioObjectPropertyElement) - The audio object property element for the channel. ``` ```APIDOC ## setVolume:forChannel:error: ### Description Sets the volume for a specific channel on the `AVAudioEngine.outputNode.audioUnit`. ### Method - (BOOL)setVolume:(float)volume forChannel:(AudioObjectPropertyElement)channel error:(NSError *_Nullable *_Nullable)error; ### Parameters - **volume** (float) - The desired volume level. - **channel** (AudioObjectPropertyElement) - The audio object property element for the channel. - **error** (NSError *_Nullable *_Nullable) - An optional pointer to an `NSError` object to receive error information. ``` -------------------------------- ### replayGainAlbumPeak Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the replay gain album peak for the audio metadata. ```APIDOC ## replayGainAlbumPeak ### Description Represents the replay gain album peak for the audio metadata. ### Method Swift ### Endpoint public var replayGainAlbumPeak: Double? { get set } ``` -------------------------------- ### - initWithURL:destinationURL:error: Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioConverter.html Initializes an SFBAudioConverter object for converting audio between the specified source and destination URLs, with error handling. ```APIDOC ## initWithURL:destinationURL:error: ### Description Returns an initialized SFBAudioConverter object for the given URLs or nil on failure. ### Method - (nullable instancetype)initWithURL:(nonnull NSURL *)sourceURL destinationURL:(nonnull NSURL *)destinationURL error:(NSError *_Nullable *_Nullable)error; ### Parameters #### Path Parameters - **sourceURL** (NSURL) - The source URL - **destinationURL** (NSURL) - The destination URL - **error** (NSError *) - An optional pointer to a NSError to receive error information ### Return Value An initialized SFBAudioConverter object for the specified URLs, or nil on failure ``` -------------------------------- ### replayGainAlbumGain Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the replay gain album gain for the audio metadata. ```APIDOC ## replayGainAlbumGain ### Description Represents the replay gain album gain for the audio metadata. ### Method Swift ### Endpoint public var replayGainAlbumGain: Double? { get set } ``` -------------------------------- ### - initWithURL:destinationURL: Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioConverter.html Initializes an SFBAudioConverter object for converting audio between the specified source and destination URLs. ```APIDOC ## initWithURL:destinationURL: ### Description Returns an initialized SFBAudioConverter object for the given URLs or nil on failure. ### Method - (nullable instancetype)initWithURL:(nonnull NSURL *)sourceURL destinationURL:(nonnull NSURL *)destinationURL; ### Parameters #### Path Parameters - **sourceURL** (NSURL) - The source URL - **destinationURL** (NSURL) - The destination URL ### Return Value An initialized SFBAudioConverter object for the specified URLs, or nil on failure ``` -------------------------------- ### plugIns() Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioPlugIn.html Returns an array of all available audio plug-ins. This corresponds to the kAudioHardwarePropertyPlugInList on kAudioObjectSystemObject. ```APIDOC ## plugIns() ### Description Returns the available audio plug-ins. ### Declaration Swift ```swift public class func plugIns() throws -> [AudioPlugIn] ``` ``` -------------------------------- ### replayGainTrackPeak Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the replay gain track peak for the audio metadata. ```APIDOC ## replayGainTrackPeak ### Description Represents the replay gain track peak for the audio metadata. ### Method Swift ### Endpoint public var replayGainTrackPeak: Double? { get set } ``` -------------------------------- ### replayGainTrackGain Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the replay gain track gain for the audio metadata. ```APIDOC ## replayGainTrackGain ### Description Represents the replay gain track gain for the audio metadata. ### Method Swift ### Endpoint public var replayGainTrackGain: Double? { get set } ``` -------------------------------- ### initWithURL:encoder: Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioConverter.html Initializes an SFBAudioConverter object with a source URL and an encoder. ```APIDOC ## initWithURL:encoder: ### Description Initializes an SFBAudioConverter object with a source URL and an encoder. ### Method Objective-C ### Endpoint - (nullable instancetype)initWithURL:(nonnull NSURL *)sourceURL encoder:(nonnull id)encoder; ### Parameters #### Path Parameters - **sourceURL** (NSURL *) - Required - The source URL - **encoder** (id) - Required - The encoder ### Return Value An initialized SFBAudioConverter object for the specified URL and encoder, or nil on failure. ``` -------------------------------- ### replayGainReferenceLoudness Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the replay gain reference loudness for the audio metadata. ```APIDOC ## replayGainReferenceLoudness ### Description Represents the replay gain reference loudness for the audio metadata. ### Method Swift ### Endpoint public var replayGainReferenceLoudness: Double? { get set } ``` -------------------------------- ### Initialization with Input Source Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBDSDDecoder.html Methods to initialize an SFBDSDDecoder object using an SFBInputSource. ```APIDOC ## Initialization ### `-initWithInputSource:` Returns an initialized `SFBDSDDecoder` object for the given input source or `nil` on failure. #### Declaration Objective-C ``` - (nullable instancetype)initWithInputSource: (nonnull SFBInputSource *)inputSource; ``` #### Parameters `_inputSource_` | The input source #### Return Value An initialized `SFBDSDDecoder` object for the specified input source, or `nil` on failure. ### `-initWithInputSource:error:` Returns an initialized `SFBDSDDecoder` object for the given input source or `nil` on failure. #### Declaration Objective-C ``` - (nullable instancetype) initWithInputSource:(nonnull SFBInputSource *)inputSource error:(NSError *_Nullable *_Nullable)error; ``` #### Parameters `_inputSource_` | The input source `_error_` | An optional pointer to a `NSError` to receive error information #### Return Value An initialized `SFBDSDDecoder` object for the specified input source, or `nil` on failure. ### `-initWithInputSource:mimeType:error:` Returns an initialized `SFBDSDDecoder` object for the given input source or `nil` on failure. #### Declaration Objective-C ``` - (nullable instancetype) initWithInputSource:(nonnull SFBInputSource *)inputSource mimeType:(nullable NSString *)mimeType error:(NSError *_Nullable *_Nullable)error; ``` #### Parameters `_inputSource_` | The input source `_mimeType_` | The MIME type of `inputSource` or `nil` `_error_` | An optional pointer to a `NSError` to receive error information #### Return Value An initialized `SFBDSDDecoder` object for the specified input source, or `nil` on failure. ``` -------------------------------- ### bpm Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Gets or sets the Beats Per Minute (BPM) for the audio metadata. ```APIDOC ## bpm ### Description Represents the Beats Per Minute (BPM) for the audio metadata. ### Method Swift ### Endpoint public var bpm: Int? { get set } ``` -------------------------------- ### - initWithURL:encoder: Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioConverter.html Initializes an SFBAudioConverter object for converting audio from a given URL using a specified encoder. ```APIDOC ## initWithURL:encoder: ### Description Returns an initialized SFBAudioConverter object for the given URL and encoder or nil on failure. ### Method - (nullable instancetype)initWithURL:(nonnull NSURL *)sourceURL encoder:(nonnull id)encoder; ### Parameters #### Path Parameters - **sourceURL** (NSURL) - The source URL - **encoder** (id) - The encoder processing the decoded audio ### Return Value An initialized SFBAudioConverter object for the specified URL and encoder, or nil on failure ``` -------------------------------- ### Get Current Playback State Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayer.html Returns the current playback state of the SFBAudioPlayer. ```Objective-C @property (nonatomic, readonly) SFBAudioPlayerPlaybackState playbackState; ``` -------------------------------- ### Get Box UID Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioBox.html Retrieves the unique identifier (UID) of the audio box. ```APIDOC ## boxUID() ### Description Returns the box UID. ### Method `public func boxUID() throws -> String` ``` -------------------------------- ### Initialize with Input Source and Loop Parameters Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBLoopableRegionDecoder.html Initializes the decoder with an SFBInputSource, defining the loop's start frame position, frame length, and repeat count. Use this for custom input sources. ```Objective-C - (nullable instancetype) initWithInputSource:(nonnull SFBInputSource *)inputSource framePosition:(AVAudioFramePosition)framePosition frameLength:(AVAudioFramePosition)frameLength error:(NSError *_Nullable *_Nullable)error; ``` ```Objective-C - (nullable instancetype) initWithInputSource:(nonnull SFBInputSource *)inputSource framePosition:(AVAudioFramePosition)framePosition frameLength:(AVAudioFramePosition)frameLength repeatCount:(NSInteger)repeatCount error:(NSError *_Nullable *_Nullable)error; ``` -------------------------------- ### Is Ready Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayerNode.html Returns YES if a decoder is available to supply audio for the next render cycle. ```APIDOC ## isReady ### Description Returns YES if a decoder is available to supply audio for the next render cycle. ### Property @property (nonatomic, readonly) BOOL isReady; ``` -------------------------------- ### Get Latency Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioClockDevice.html Returns the latency of the clock device. This corresponds to the kAudioClockDevicePropertyDeviceIsRunning property. ```swift public func latency() throws -> UInt32 ``` -------------------------------- ### Initialize SFBInputSource from URL Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBInputSource.html Creates an SFBInputSource object from a given URL. Use this when your input data is accessible via a network or file path. ```Objective-C + (nullable instancetype)inputSourceForURL:(nonnull NSURL *)url flags:(SFBInputSourceFlags)flags error:(NSError *_Nullable *_Nullable)error; ``` -------------------------------- ### Notify when rendering is about to start Source: https://sbooth.github.io/SFBAudioEngine/Protocols/SFBAudioPlayerDelegate.html Called before audio rendering begins. Provides the host time for the first frame. Do not modify the decoder properties. ```Objective-C - (void)audioPlayer:(nonnull SFBAudioPlayer *)audioPlayer renderingWillStart:(nonnull id)decoder atHostTime:(uint64_t)hostTime; ``` -------------------------------- ### Create SFBAudioFile from URL with Error Handling Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioFile.html Create an SFBAudioFile object from a URL, populating properties and metadata. Returns nil on failure. ```Objective-C + (nullable instancetype)audioFileWithURL:(nonnull NSURL *)url error:(NSError *_Nullable *_Nullable)error; ``` -------------------------------- ### Get Channel Count from AudioChannelLayout Source: https://sbooth.github.io/SFBAudioEngine/Extensions/AudioChannelLayout.html Retrieves the number of channels in an AudioChannelLayout. This is a read-only property. ```swift public var channelCount: UInt32 { get } ``` -------------------------------- ### Get Length Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBOutputSource.html Retrieves the length of the output, in bytes. Returns YES on success, NO otherwise. ```APIDOC ## - getLength:error: ### Description Returns the length of the output, in bytes. ### Method Objective-C ```objc - (BOOL)getLength:(nonnull NSInteger *)length error:(NSError *_Nullable *_Nullable)error; ``` ### Parameters - `_length_` (NSInteger) - A pointer to store the length. - `_error_` (NSError) - An optional pointer to an NSError object to receive error information. ### Return Value YES on success, NO otherwise. ``` -------------------------------- ### setPowerHint(_:) Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioSystemObject.html Sets the power hint for the audio system. ```APIDOC ## setPowerHint(_:) ### Description Sets the power hint. ### Method POST (conceptual) ### Endpoint N/A (SDK method) ### Parameters #### Request Body - **value** (AudioHardwarePowerHint) - Required - The power hint to set. ### Request Example ```json { "value": "AudioHardwarePowerHint.Aggregate" } ``` ### Response #### Success Response (200) Indicates successful setting of the power hint. ### Response Example ``` Success ``` ``` -------------------------------- ### Initialize SFBAudioPlayerNode with Sample Rate and Channels Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayerNode.html Initializes an SFBAudioPlayerNode with a specific sample rate and number of channels. Ensure the provided values match the expected audio format. ```Objective-C - (nonnull instancetype)initWithSampleRate:(double)sampleRate channels:(AVAudioChannelCount)channels; ``` -------------------------------- ### Get Attached Pictures Property Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioMetadata.html Provides read-only access to a set of all attached pictures. ```Objective-C @property (nonatomic, readonly) NSSet *_Nonnull attachedPictures; ``` -------------------------------- ### Get Manufacturer - AudioObject Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioObject.html Retrieves the manufacturer of the audio object. This corresponds to the kAudioObjectPropertyManufacturer property. ```swift public func manufacturer() throws -> String ``` -------------------------------- ### AudioClockDevice Class Methods Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioClockDevice.html Static methods for retrieving and creating AudioClockDevice instances. ```APIDOC ## AudioClockDevice.clockDevices() ### Description Returns the available audio clock devices. This corresponds to the property `kAudioHardwarePropertyClockDeviceList` on `kAudioObjectSystemObject`. ### Method `public class func clockDevices() throws -> [AudioClockDevice]` ``` ```APIDOC ## AudioClockDevice.makeClockDevice(forUID:) ### Description Returns an initialized `AudioClockDevice` with `uid` or `nil` if unknown. This corresponds to the property `kAudioHardwarePropertyTranslateUIDToClockDevice` on `kAudioObjectSystemObject`. ### Method `public class func makeClockDevice(forUID uid: String) throws -> AudioClockDevice?` ### Parameters #### Path Parameters - **uid** (String) - Required - The UID of the desired clock device ``` -------------------------------- ### Initialization Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioProperties.html Initializes an SFBAudioProperties object. ```APIDOC ## init ### Description Returns an initialized an `SFBAudioProperties` object. ### Method - (instancetype)init; ### Declaration Objective-C ```objc - (nonnull instancetype)init; ``` ``` ```APIDOC ## initWithDictionaryRepresentation: ### Description Returns an initialized an `SFBAudioProperties` object populated with values from `dictionaryRepresentation`. ### Method - (instancetype)initWithDictionaryRepresentation:(NSDictionary *)dictionaryRepresentation; ### Parameters - `_dictionaryRepresentation_` (NSDictionary) - A dictionary containing the desired values. ### Declaration Objective-C ```objc - (nonnull instancetype)initWithDictionaryRepresentation: (nonnull NSDictionary *)dictionaryRepresentation; ``` ``` -------------------------------- ### Get Picture Type from SFBAttachedPicture Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAttachedPicture.html Access the artwork type associated with the SFBAttachedPicture object. ```Objective-C @property (nonatomic, readonly) SFBAttachedPictureType pictureType; ``` -------------------------------- ### Get Device Configuration Application Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioDevice.html Retrieves the name of the application used for configuring the audio device. This corresponds to the kAudioDevicePropertyConfigurationApplication property. ```swift public func configurationApplication() throws -> String ``` -------------------------------- ### initWithDecoder:destinationURL: Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioConverter.html Initializes an SFBAudioConverter object with a decoder and a destination URL. ```APIDOC ## initWithDecoder:destinationURL: ### Description Initializes an SFBAudioConverter object with a decoder and a destination URL. ### Method Objective-C ### Endpoint - (nullable instancetype)initWithDecoder:(nonnull id)decoder destinationURL:(nonnull NSURL *)destinationURL; ### Parameters #### Path Parameters - **decoder** (id) - Required - The decoder - **destinationURL** (NSURL *) - Required - The destination URL ### Return Value An initialized SFBAudioConverter object for the specified decoder and URL, or nil on failure. ``` -------------------------------- ### Initialization with Input Source Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioDecoder.html Initializes an SFBAudioDecoder with a given input source. Supports initialization with or without an error parameter, and with an optional MIME type. ```APIDOC ## -initWithInputSource: ### Description Returns an initialized SFBAudioDecoder object for the given input source or nil on failure. ### Declaration Objective-C ``` - (nullable instancetype)initWithInputSource: (nonnull SFBInputSource *)inputSource; ``` ### Parameters ` _inputSource_ ` | The input source ### Return Value An initialized SFBAudioDecoder object for the specified input source, or nil on failure. ## -initWithInputSource:error: ### Description Returns an initialized SFBAudioDecoder object for the given input source or nil on failure. ### Declaration Objective-C ``` - (nullable instancetype) initWithInputSource:(nonnull SFBInputSource *)inputSource error:(NSError *_Nullable *_Nullable)error; ``` ### Parameters ` _inputSource_ ` | The input source ` _error_ ` | An optional pointer to a NSError to receive error information ### Return Value An initialized SFBAudioDecoder object for the specified input source, or nil on failure. ## -initWithInputSource:mimeType:error: ### Description Returns an initialized SFBAudioDecoder object for the given input source or nil on failure. ### Declaration Objective-C ``` - (nullable instancetype) initWithInputSource:(nonnull SFBInputSource *)inputSource mimeType:(nullable NSString *)mimeType error:(NSError *_Nullable *_Nullable)error; ``` ### Parameters ` _inputSource_ ` | The input source ` _mimeType_ ` | The MIME type of inputSource or nil ` _error_ ` | An optional pointer to a NSError to receive error information ### Return Value An initialized SFBAudioDecoder object for the specified input source, or nil on failure. ``` -------------------------------- ### Get Available Audio Boxes Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioBox.html Retrieves a list of all available audio boxes on the system. ```APIDOC ## boxes() ### Description Returns the available audio boxes. ### Method `public class func boxes() throws -> [AudioBox]` ``` -------------------------------- ### Get Clock Domain Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioClockDevice.html Returns the domain of the clock device. This corresponds to the kAudioClockDevicePropertyClockDomain property. ```swift public func domain() throws -> UInt32 ``` -------------------------------- ### Play Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioPlayerNode.html Begins pushing audio from the current decoder. ```APIDOC ## play ### Description Begins pushing audio from the current decoder. ### Method - (void)play; ``` -------------------------------- ### Get AudioControl Element Source: https://sbooth.github.io/SFBAudioEngine/Classes/AudioControl.html Retrieves the element of the audio control. This corresponds to the kAudioControlPropertyElement property. ```swift public func element() throws -> PropertyElement ``` -------------------------------- ### Initialization with URL Source: https://sbooth.github.io/SFBAudioEngine/Classes/SFBAudioDecoder.html Initializes an SFBAudioDecoder with a given URL. Supports initialization with or without an error parameter, and with an optional MIME type. ```APIDOC ## -initWithURL: ### Description Returns an initialized SFBAudioDecoder object for the given URL or nil on failure. ### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url; ``` ### Parameters ` _url_ ` | The URL ### Return Value An initialized SFBAudioDecoder object for the specified URL, or nil on failure. ## -initWithURL:error: ### Description Returns an initialized SFBAudioDecoder object for the given URL or nil on failure. ### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url error:(NSError *_Nullable *_Nullable)error; ``` ### Parameters ` _url_ ` | The URL ` _error_ ` | An optional pointer to a NSError to receive error information ### Return Value An initialized SFBAudioDecoder object for the specified URL, or nil on failure. ## -initWithURL:mimeType:error: ### Description Returns an initialized SFBAudioDecoder object for the given URL or nil on failure. ### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url mimeType:(nullable NSString *)mimeType error:(NSError *_Nullable *_Nullable)error; ``` ### Parameters ` _url_ ` | The URL ` _mimeType_ ` | The MIME type of url or nil ` _error_ ` | An optional pointer to a NSError to receive error information ### Return Value An initialized SFBAudioDecoder object for the specified URL, or nil on failure. ## -initWithURL:decoderName: ### Description Returns an initialized SFBAudioDecoder object for the given URL or nil on failure. ### Declaration Objective-C ``` - (nullable instancetype)initWithURL:(nonnull NSURL *)url decoderName:(nonnull SFBAudioDecoderName)decoderName; ``` ### Parameters ` _url_ ` | The URL ` _decoderName_ ` | The name of the decoder to use ```