~ubuntu-branches/ubuntu/wily/ecasound/wily-proposed

« back to all changes in this revision

Viewing changes to libecasound/audiofx_reverb.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghedini
  • Date: 2011-05-12 17:58:03 UTC
  • Revision ID: james.westby@ubuntu.com-20110512175803-zy3lodjecabt9r3v
Tags: upstream-2.8.0
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef INCLUDED_AUDIOFX_REVERB_H
 
2
#define INCLUDED_AUDIOFX_REVERB_H
 
3
 
 
4
#include <vector>
 
5
#include "audiofx_timebased.h"
 
6
 
 
7
/**
 
8
 * Reverb effect
 
9
 *
 
10
 * May 2000, Stefan Fendt (C++ version by Kai Vehmanen)
 
11
 */
 
12
class ADVANCED_REVERB : public EFFECT_TIME_BASED {
 
13
 private:
 
14
 
 
15
  SAMPLE_ITERATOR_CHANNELS i_channels;
 
16
  parameter_t roomsize_rep;
 
17
  parameter_t feedback_rep;
 
18
  parameter_t wet_rep;
 
19
 
 
20
  class CHANNEL_DATA {
 
21
  public:
 
22
    std::vector<SAMPLE_SPECS::sample_t> buffer;
 
23
    std::vector<long int> dpos;
 
24
    std::vector<parameter_t> mul;
 
25
    long int bufferpos_rep;
 
26
    SAMPLE_SPECS::sample_t oldvalue, lpvalue;
 
27
 
 
28
    CHANNEL_DATA(void) : buffer(65536, 0.0), dpos(200), mul(200), bufferpos_rep(0) { }
 
29
  };
 
30
  std::vector<CHANNEL_DATA> cdata;
 
31
 
 
32
 public:
 
33
 
 
34
  virtual std::string name(void) const { return("Advanced reverb"); }
 
35
  virtual std::string parameter_names(void) const { return("Room-size,feedback-%,wet-%"); }
 
36
  virtual void parameter_description(int param, struct PARAM_DESCRIPTION *pd) const;
 
37
 
 
38
  virtual parameter_t get_parameter(int param) const;
 
39
  virtual void set_parameter(int param, parameter_t value);
 
40
 
 
41
  virtual void init(SAMPLE_BUFFER* insample);
 
42
  virtual void process(void);
 
43
 
 
44
  ADVANCED_REVERB* clone(void) const { return new ADVANCED_REVERB(*this); }
 
45
  ADVANCED_REVERB* new_expr(void) const { return new ADVANCED_REVERB(); }
 
46
  ADVANCED_REVERB (parameter_t roomsize = 10.0, parameter_t feedback_percent = 50.0, parameter_t wet_percent = 50.0);
 
47
};
 
48
 
 
49
#endif