Contents

struct

SushiDSP::ICabinetHost

A node that can carry a cabinet impulse response in its signal path.

Declared in
include/SushiDSP/core/ICabinetHost.hpp

A host discovers it with dynamic_cast<ICabinetHost*> on an IAudioNode, so no host names a concrete amplifier type to load a cabinet.

Public member functions

virtual ~ICabinetHost()=default
virtual bool set_cabinet(Ir impulse_response)=0

Installs a new cabinet impulse response and hands it to the audio thread as one atomic pointer swap.

Control thread only.

Parameters

impulse_response

The IR and the rate it was captured at; its sample_rate must equal the rate this node was prepared at (include/SushiDSP/README.md).

Returns

True if the cabinet was installed; false if the IR is empty, the rates disagree, or prepare() has not run yet, and then the active cabinet stays in place.

virtual void reclaim_cabinets()=0

Frees every cabinet the audio thread has provably moved past.

Precondition

Called on the control thread, never concurrently with process(); call it periodically (e.g. once per GUI frame) after any set_cabinet().

virtual bool has_cabinet() const =0

Whether a cabinet convolution is currently in the signal path.

Returns

True once a cabinet has been installed by the constructor or set_cabinet().