~mixxxdevelopers/mixxx/features_library_scanner

« back to all changes in this revision

Viewing changes to mixxx/mixxx/enginepregain.cpp

  • Committer: tuehaste
  • Date: 2002-02-26 11:12:07 UTC
  • Revision ID: vcs-imports@canonical.com-20020226111207-5rly26cj9gdd19ba
Initial revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "enginepregain.h"
 
2
 
 
3
/*----------------------------------------------------------------
 
4
  A pregaincontrol is ... a pregain.
 
5
  ----------------------------------------------------------------*/
 
6
EnginePregain::EnginePregain(int potmeter_midi, MidiObject* midi)
 
7
{
 
8
  // ERROR IN THE FOLLOWING LINE *******************
 
9
  //pregainpot = new ControlPotmeter("pregainpot", potmeter_midi, this, midi, 5., 0.25);
 
10
  connect(pregainpot, SIGNAL(valueChanged(FLOAT)), this, SLOT(slotUpdate(FLOAT)));
 
11
  pregain = 1.0;
 
12
}
 
13
 
 
14
EnginePregain::~EnginePregain() {
 
15
    delete pregainpot;
 
16
}
 
17
 
 
18
void EnginePregain::slotUpdate(FLOAT newvalue) {
 
19
  pregain = newvalue;
 
20
}
 
21
 
 
22
void EnginePregain::process(CSAMPLE *source, CSAMPLE* destination, int buffer_size) {
 
23
  for (int i=0; i<buffer_size; i++)
 
24
    destination[i] = source[i]*pregain;
 
25
}