Protocols

The following protocols are available globally.

  • The AudioPlayerDelegate provides event callbacks for the AudioPlayer. AudioPlayerDelegate provides a small set of delegate methods in favor of notifications to allow multiple receivers of the AudioPlayer event callbacks since only one player is typically used in an application. Specifically, these methods are provided for high frequency callbacks that wrap the AudioPlayer’s internal EZAudioFile and EZOutput instances. - warning: These callbacks don’t necessarily occur on the main thread so make sure you wrap any UI code in a GCD block like: dispatch_async(dispatch_get_main_queue(), ^{ // Update UI });

    See more

    Declaration

    Objective-C

    @protocol AudioPlayerDelegate <NSObject>

    Swift

    protocol AudioPlayerDelegate : NSObjectProtocol
  • Callback methods for reporting playback progress information.

    See more

    Declaration

    Objective-C

    @protocol AudioPlayerVCDelegate <NSObject>

    Swift

    protocol AudioPlayerVCDelegate : NSObjectProtocol
  • The EZAudioDisplayLinkDelegate provides a means for an EZAudioDisplayLink instance to notify a receiver when it should redraw itself.

    See more

    Declaration

    Objective-C

    @protocol EZAudioDisplayLinkDelegate <NSObject>

    Swift

    protocol EZAudioDisplayLinkDelegate : NSObjectProtocol
  • The EZAudioFFTDelegate provides event callbacks for the EZAudioFFT (and subclasses such as the EZAudioFFTRolling) whenvever the FFT is computed.

    See more

    Declaration

    Objective-C

    @protocol EZAudioFFTDelegate <NSObject>

    Swift

    protocol EZAudioFFTDelegate : NSObjectProtocol
  • The EZAudioFileDelegate provides event callbacks for the EZAudioFile object. These type of events are triggered by reads and seeks on the file and gives feedback such as the audio data read as a float array for visualizations and the new seek position for UI updating.

    See more

    Declaration

    Objective-C

    @protocol EZAudioFileDelegate <NSObject>

    Swift

    protocol EZAudioFileDelegate : NSObjectProtocol
  • The EZAudioPlayerDelegate provides event callbacks for the EZAudioPlayer. Since 0.5.0 the EZAudioPlayerDelegate provides a smaller set of delegate methods in favor of notifications to allow multiple receivers of the EZAudioPlayer event callbacks since only one player is typically used in an application. Specifically, these methods are provided for high frequency callbacks that wrap the EZAudioPlayer’s internal EZAudioFile and EZOutput instances. - warning: These callbacks don’t necessarily occur on the main thread so make sure you wrap any UI code in a GCD block like: dispatch_async(dispatch_get_main_queue(), ^{ // Update UI });

    See more

    Declaration

    Objective-C

    @protocol EZAudioPlayerDelegate <NSObject>

    Swift

    protocol EZAudioPlayerDelegate : NSObjectProtocol
  • The EZMicrophoneDelegate for the EZMicrophone provides a receiver for the incoming audio data events. When the microphone has been successfully internally configured it will try to send its delegate an AudioStreamBasicDescription describing the format of the incoming audio data.

    The audio data itself is sent back to the delegate in various forms:

    -microphone:hasAudioReceived:withBufferSize:withNumberOfChannels: Provides float arrays instead of the AudioBufferList structure to hold the audio data. There could be a number of float arrays depending on the number of channels (see the function description below). These are useful for doing any visualizations that would like to make use of the raw audio data.

    -microphone:hasBufferList:withBufferSize:withNumberOfChannels: Provides the AudioBufferList structures holding the audio data. These are the native structures Core Audio uses to hold the buffer information and useful for piping out directly to an output (see EZOutput).

    See more

    Declaration

    Objective-C

    @protocol EZMicrophoneDelegate <NSObject>

    Swift

    protocol EZMicrophoneDelegate : NSObjectProtocol
  • 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.

    See more

    Declaration

    Objective-C

    @protocol EZOutputDataSource <NSObject>

    Swift

    protocol EZOutputDataSource : NSObjectProtocol
  • The EZOutputDelegate for the EZOutput component provides a receiver to handle play state, device, and audio data change events. This is very similar to the EZMicrophoneDelegate for the EZMicrophone and the EZAudioFileDelegate for the EZAudioFile.

    See more

    Declaration

    Objective-C

    @protocol EZOutputDelegate <NSObject>

    Swift

    protocol EZOutputDelegate : NSObjectProtocol
  • The EZRecorderDelegate for the EZRecorder provides a receiver for write events, recorderUpdatedCurrentTime:, and the close event, recorderDidClose:.

    See more

    Declaration

    Objective-C

    @protocol EZRecorderDelegate <NSObject>

    Swift

    protocol EZRecorderDelegate : NSObjectProtocol