EZOutputDataSource

@protocol EZOutputDataSource <NSObject>

The EZOutputDataSource specifies a receiver to provide audio data when the EZOutput is started. Since the 0.4.0 release this has been simplified to only one data source method.

  • Provides a way to provide output with data anytime the EZOutput needs audio data to play. This function provides an already allocated AudioBufferList to use for providing audio data into the output buffer. The expected format of the audio data provided here is specified by the EZOutput inputFormat property. This audio data will be converted into the client format specified by the EZOutput clientFormat property. - parameter: output The instance of the EZOutput that asked for the data. - parameter: audioBufferList The AudioBufferList structure pointer that needs to be filled with audio data - parameter: frames The amount of frames as a UInt32 that output will need to properly fill its output buffer. - parameter: timestamp A AudioTimeStamp pointer to use if you need the current host time. - returns: An OSStatus code. If there was no error then use the noErr status code.

    Declaration

    Objective-C

    - (OSStatus)output:(EZOutput *)output
        shouldFillAudioBufferList:(AudioBufferList *)audioBufferList
               withNumberOfFrames:(UInt32)frames
                        timestamp:(const AudioTimeStamp *)timestamp;

    Swift

    func output(_ output: EZOutput!, shouldFill audioBufferList: UnsafeMutablePointer

    Parameters

    output

    The instance of the EZOutput that asked for the data.

    audioBufferList

    The AudioBufferList structure pointer that needs to be filled with audio data

    frames

    The amount of frames as a UInt32 that output will need to properly fill its output buffer.

    timestamp

    A AudioTimeStamp pointer to use if you need the current host time.

    Return Value

    An OSStatus code. If there was no error then use the noErr status code.