/[svn]/linuxsampler/trunk/src/effects/EffectControl.h
ViewVC logotype

Contents of /linuxsampler/trunk/src/effects/EffectControl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2183 - (show annotations) (download) (as text)
Sat Jun 11 17:53:32 2011 UTC (8 years, 2 months ago) by persson
File MIME type: text/x-c++hdr
File size: 1497 byte(s)
* Mac OS X fixes: support the new dir for Core Audio SDK, fixed name
  collision of enum in EffectControl, fixed building outside source
  directory, fixed wrong name of destructor in
  AudioOutputDeviceCoreAudio.cpp
* made sure all source files for hostplugins are included when doing
  "make dist"
* removed empty directories left from the cvs to svn migration

1 /*
2 Copyright (C) 2010 Christian Schoenebeck
3 */
4
5 #ifndef LS_EFFECTCONTROL_H
6 #define LS_EFFECTCONTROL_H
7
8 #include "../common/Exception.h"
9 #include "../common/optional.h"
10 #include <vector>
11
12 namespace LinuxSampler {
13
14 // just symbol prototyping
15 class Effect;
16
17 /**
18 * Represents an effect parameter. As the set of parameters an effect offers,
19 * varies quite a bit, this class provides necessary informations about the
20 * respective effect parameter.
21 */
22 class EffectControl {
23 public:
24 enum Type_t {
25 EFFECT_TYPE_FLOAT,
26 EFFECT_TYPE_INT,
27 EFFECT_TYPE_BOOL
28 };
29
30 EffectControl();
31 virtual ~EffectControl();
32 virtual void SetValue(float val) throw (Exception);
33 virtual float& Value();
34 Type_t Type() const;
35 String TypeAsString() const;
36 String Description() const;
37 optional<float> DefaultValue() const;
38 optional<float> MinValue() const;
39 optional<float> MaxValue() const;
40 std::vector<float> Possibilities() const;
41
42 protected:
43 void SetDefaultValue(float val);
44 void SetMinValue(float val);
45 void SetMaxValue(float val);
46 void SetType(Type_t t);
47 void SetDescription(String s);
48 void SetPossibilities(const std::vector<float>& v);
49
50 friend class Effect;
51
52 private:
53 float value;
54 Type_t type;
55 String description;
56 optional<float> defaultValue;
57 optional<float> minValue;
58 optional<float> maxValue;
59 std::vector<float> possibilities;
60 };
61
62 } // namespace LinuxSampler
63
64 #endif // LS_EFFECTCONTROL_H

  ViewVC Help
Powered by ViewVC