SPKitAmp


User's Guide

SPKitAmp is an amplifier class. It multiplies input samples by a gain value, which is set by the setGain(double) member function. Default gain is 1, which results in no gain change.

Programmer's Reference

Defined in <spkit/amp.h>
Inherits from SPKitProcessor

SPKitAmp defines a setGain() function for setting amplification gain and overrides getSample().

Public Members

SPKitError setInput(SPKitProcessor* newInput)
connect an input to the object and initialize it. Sets gain to 1.0.

Calls SPKitProcessor::setInput().

int getSample(SPKitSample& outputSample)
retrieve a processed audio sample

getSample() multiplies each input sample by gain.

getSample() stores the processed sample in outputSample. The function returns 0 on end of signal, 1 otherwise.

Non-virtual functions:
void setGain(double g)
set gain to g.

Protected Members

int gain
amplification gain

Return to SPKit home

Kai Lassfolk / University of Helsinki / kpl@elisir.helsinki.fi