class EffectsProcessorV1

Defined at line 20 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

EffectsProcessorV1 represents a queue of active effect instances and manages chaining calls of

Process/ProcessInPlace through a chain of effects.

This class is designed to be used synchronously and is not explicitly multi-thread-safe.

Public Methods

void EffectsProcessorV1 ()

Creates a new, empty effects processor.

Defined at line 23 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

zx_status_t AddEffect (EffectV1 e)

Adds an `EffectV1` to the end of the queue of effects included in this processor.

When the first `EffectV1` is added, that effects input channels becomes the input to the entire

processor. Likewise that effects output channels becomes the processors output channels.

When subsequent effects are added, the new effects input channels must match exactly the out-

put channels of last added effect. The output channels for the processor will be updated to

match the output channels of the newly added effect.

Aborts if `e` is an invalid `EffectV1`.

Defined at line 25 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.cc

void EffectsProcessorV1 (const EffectsProcessorV1 & )

Disallow copy/move.

Defined at line 26 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

EffectsProcessorV1 & operator= (const EffectsProcessorV1 & )

Defined at line 27 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

void EffectsProcessorV1 (EffectsProcessorV1 && o)

Defined at line 28 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

EffectsProcessorV1 & operator= (EffectsProcessorV1 && o)

Defined at line 29 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

uint16_t size ()

Returns the number of active instances in the enclosed effect chain.

Defined at line 44 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

int32_t channels_in ()

Returns the number of input channels for this effect. This will be the number of channels

expected for input frames to `Process` or `ProcessInPlace`.

Returns 0 if this processor has no effects.

Defined at line 50 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

int32_t channels_out ()

Returns the number of output channels for this effect.

Returns 0 if this processor has no effects.

Defined at line 55 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

int64_t block_size ()

Returns the required block size (in frames) for this processor. Calls to |ProcessInPlace| must

provide frames in multiples of |block_size()|.

Defined at line 59 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

int64_t max_batch_size ()

Returns the maximum buffer size (in frames) the processor is prepared to handle with a single

call to |ProcessInPlace| or |Process|.

Returns 0 if the plugin can handle arbitrary buffer sizes.

Defined at line 65 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

int64_t delay_frames ()

Returns the number of frames the input signal will be delayed after being run through this

|EffectsProcessorV1|.

Defined at line 69 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

const EffectV1 & GetEffectAt (int64_t position)

Aborts if position is out-of-range.

Defined at line 69 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.cc

int64_t ring_out_frames ()

Returns the number of frames of silence that this processor requires to idle.

Defined at line 72 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

iterator begin ()

Defined at line 74 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

iterator end ()

Defined at line 75 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

const_iterator cbegin ()

Defined at line 76 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

const_iterator cend ()

Defined at line 77 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.h

zx_status_t ProcessInPlace (int64_t num_frames, float * audio_buff_in_out)

For this FX chain, call each instance's FxProcessInPlace() in sequence.

Per spec, fail if audio_buff_in_out is nullptr (even if num_frames is 0).

Also, if any instance fails Process, exit without calling the others.

TODO(mpuryear): Should we still call the other instances, if one fails?

Defined at line 79 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.cc

zx_status_t Process (int64_t num_frames, float * audio_buff_in, float ** audio_buff_out)

Defined at line 103 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.cc

zx_status_t Flush ()

For this EffectV1 chain, call each instance's Flush() in sequence. If any instance fails,

continue Flushing the remaining Effects but only the first error will be reported.

Return ZX_OK iff all Effects are successfully flushed.

Defined at line 144 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.cc

void SetStreamInfo (const fuchsia_audio_effects_stream_info & stream_info)

Defined at line 161 of file ../../src/media/audio/lib/effects_loader/effects_processor_v1.cc