/[svn]/linuxsampler/trunk/src/engines/FxSend.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/FxSend.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1026 by schoenebeck, Sun Jan 14 17:10:59 2007 UTC revision 1108 by iliev, Thu Mar 22 20:39:04 2007 UTC
# Line 28  Line 28 
28    
29  #include <map>  #include <map>
30    
31    #define DEFAULT_FX_SEND_LEVEL   0.0f
32    
33  namespace LinuxSampler {  namespace LinuxSampler {
34    
35      FxSend::FxSend(EngineChannel* pEngineChannel, uint8_t MidiCtrl, String Name) throw (Exception) {      FxSend::FxSend(EngineChannel* pEngineChannel, uint8_t MidiCtrl, String Name) throw (Exception) {
# Line 70  namespace LinuxSampler { Line 72  namespace LinuxSampler {
72          }          }
73          __done:          __done:
74    
75          fLevel = 0.3f; // default FX send level          fLevel = DEFAULT_FX_SEND_LEVEL;
76      }      }
77    
78      int FxSend::DestinationChannel(int SrcChan) {      int FxSend::DestinationChannel(int SrcChan) {
# Line 116  namespace LinuxSampler { Line 118  namespace LinuxSampler {
118      }      }
119    
120      void FxSend::SetLevel(float f) {      void FxSend::SetLevel(float f) {
121            if(fLevel == f) return;
122          fLevel = f;          fLevel = f;
123            SetInfoChanged(true);
124      }      }
125    
126      void FxSend::SetLevel(uint8_t iMidiValue) {      void FxSend::SetLevel(uint8_t iMidiValue) {
127          fLevel = float(iMidiValue & 0x7f) / 127.0f;          fLevel = float(iMidiValue & 0x7f) / 127.0f;
128            SetInfoChanged(true);
129        }
130    
131        void FxSend::Reset() {
132            SetLevel(DEFAULT_FX_SEND_LEVEL);
133      }      }
134    
135      uint8_t FxSend::MidiController() {      uint8_t FxSend::MidiController() {
# Line 141  namespace LinuxSampler { Line 150  namespace LinuxSampler {
150          return iId;          return iId;
151      }      }
152    
153        void FxSend::SetInfoChanged(bool b) {
154            bInfoChanged = b;
155        }
156    
157        bool FxSend::IsInfoChanged() {
158            return bInfoChanged;
159        }
160    
161  } // namespace LinuxSampler  } // namespace LinuxSampler

Legend:
Removed from v.1026  
changed lines
  Added in v.1108

  ViewVC Help
Powered by ViewVC