44 void MonoMute::process(
int count,
float *input,
float *output,
PluginDef*) {
45 (void)memset(output, 0, count*
sizeof(
float));
56 void StereoMute::process(
int count,
float *input0,
float *input1,
57 float *output0,
float *output1,
PluginDef*) {
58 (void)memset(output0, 0, count*
sizeof(
float));
59 (void)memset(output1, 0, count*
sizeof(
float));
72 float MaxLevel::maxlevel[channelcount] = {0};
74 void MaxLevel::process(
int count,
float *input1,
float *input2,
float*,
float*,
PluginDef*) {
79 for (
int i = 0; i < count; i++) {
80 float t = std::abs(data[c][i]);
85 maxlevel[c] =
max(maxlevel[c], level);
123 void TunerAdapter::init(
unsigned int samplingFreq,
PluginDef *plugin) {
125 int priority, policy;
128 self.pitch_tracker.init(policy, priority, samplingFreq);
131 void TunerAdapter::set_and_check(
int use,
bool on) {
141 if (use == switcher_use) {
153 void TunerAdapter::feed_tuner(
int count,
float* input,
float*,
PluginDef* plugin) {
157 int TunerAdapter::regparam(
const ParamReg& reg) {
159 a->plugin.set_on_off(
false);
185 name =
N_(
"Oscilloscope");
191 sigc::mem_fun(*
this, &OscilloscopeAdapter::change_buffersize));
194 int OscilloscopeAdapter::osc_register(
const ParamReg& reg) {
199 void OscilloscopeAdapter::change_buffersize(
unsigned int size_) {
203 unsigned int d = mul_buffer;
204 if (size_ > 1023) d = 1;
205 buffer =
new float[size_ * d];
212 float* OscilloscopeAdapter::buffer = 0;
213 unsigned int OscilloscopeAdapter::size = 0;
216 void OscilloscopeAdapter::fill_buffer(
int count,
float *input0,
float *output0,
PluginDef *p) {
218 if (count*
self.mul_buffer !=
static_cast<int>(size)) {
221 if (
self.mul_buffer > 1) {
222 (void)memmove(buffer, &buffer[count],
sizeof(
float)*count*(
self.mul_buffer-1));
224 (void)memcpy(&buffer[count*(
self.mul_buffer-1)], output0,
sizeof(float)*count);
227 int OscilloscopeAdapter::activate(
bool start,
PluginDef *plugin) {
232 memset(buffer, 0, size*
sizeof(
float));