AEBlockFilter.h File Reference
#import <Foundation/Foundation.h>
#import "TheAmazingAudioEngine.h"

Go to the source code of this file.

Classes

class  AEBlockFilter
 Block filter: Utility class to allow use of a block to filter audio. More...
 

Typedefs

typedef void(^ AEBlockFilterBlock )(AEAudioFilterProducer producer, void *producerToken, const AudioTimeStamp *time, UInt32 frames, AudioBufferList *audio)
 Filter processing block.
 

Typedef Documentation

typedef void(^ AEBlockFilterBlock)(AEAudioFilterProducer producer, void *producerToken, const AudioTimeStamp *time, UInt32 frames, AudioBufferList *audio)

Filter processing block.

A filter implementation must call the function pointed to by the producer argument, passing producerToken, audio, and frames as arguments, in order to produce as much audio is required to produce frames frames of output audio:

    OSStatus status = producer(producerToken, audio, &frames);
    if ( status != noErr ) return status;

Then the audio can be processed as desired.

Parameters
producerA function to be called to produce audio for filtering
producerTokenAn opaque pointer to be passed to producer when producing audio
timeThe time the output audio will be played or the time input audio was received, automatically compensated for hardware latency.
framesThe length of the required audio, in frames
audioThe audio buffer list to write output audio to