/[svn]/linuxsampler/trunk/src/engines/gig/Engine.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/Engine.h

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

revision 1646 by persson, Sun Jan 20 15:04:51 2008 UTC revision 1789 by iliev, Sat Nov 1 19:01:27 2008 UTC
# Line 33  Line 33 
33  #include "../../common/RingBuffer.h"  #include "../../common/RingBuffer.h"
34  #include "../../common/Pool.h"  #include "../../common/Pool.h"
35  #include "../../common/ArrayList.h"  #include "../../common/ArrayList.h"
36    #include "../../common/Condition.h"
37  #include "../../common/ConditionServer.h"  #include "../../common/ConditionServer.h"
38  #include "../Engine.h"  #include "../Engine.h"
39  #include "../common/Event.h"  #include "../common/Event.h"
# Line 67  namespace LinuxSampler { namespace gig { Line 68  namespace LinuxSampler { namespace gig {
68    
69              // implementation of abstract methods derived from class 'LinuxSampler::Engine'              // implementation of abstract methods derived from class 'LinuxSampler::Engine'
70              virtual int    RenderAudio(uint Samples);              virtual int    RenderAudio(uint Samples);
71              virtual void   SendSysex(void* pData, uint Size);              virtual void   SendSysex(void* pData, uint Size, MidiInputPort* pSender);
72              virtual void   Reset();              virtual void   Reset();
73              virtual void   Enable();              virtual void   Enable();
74              virtual void   Disable();              virtual void   Disable();
# Line 83  namespace LinuxSampler { namespace gig { Line 84  namespace LinuxSampler { namespace gig {
84              virtual String EngineName();              virtual String EngineName();
85              virtual InstrumentManager* GetInstrumentManager();              virtual InstrumentManager* GetInstrumentManager();
86    
87                void SetVoiceCount(uint Count);
88    
89              // Simple array wrapper just to make sure memory is freed              // Simple array wrapper just to make sure memory is freed
90              // when liblinuxsampler is unloaded              // when liblinuxsampler is unloaded
91              class FloatTable {              class FloatTable {
# Line 112  namespace LinuxSampler { namespace gig { Line 115  namespace LinuxSampler { namespace gig {
115              RTList<Event>*          pGlobalEvents;         ///< All engine global events for the current audio fragment (usually only SysEx messages).              RTList<Event>*          pGlobalEvents;         ///< All engine global events for the current audio fragment (usually only SysEx messages).
116              Pool<Event>*            pEventPool;            ///< Contains all Event objects that can be used.              Pool<Event>*            pEventPool;            ///< Contains all Event objects that can be used.
117              RingBuffer<uint8_t,false>* pSysexBuffer;       ///< Input buffer for MIDI system exclusive messages.              RingBuffer<uint8_t,false>* pSysexBuffer;       ///< Input buffer for MIDI system exclusive messages.
             int                     ActiveVoiceCount;      ///< number of currently active voices (this value will be returned for public calls)  
118              int                     ActiveVoiceCountTemp;  ///< number of currently active voices (for internal usage, will be used for incrementation)              int                     ActiveVoiceCountTemp;  ///< number of currently active voices (for internal usage, will be used for incrementation)
119              int                     ActiveVoiceCountMax;   ///< the maximum voice usage since application start              int                     ActiveVoiceCountMax;   ///< the maximum voice usage since application start
120              int                     VoiceSpawnsLeft;       ///< We only allow CONFIG_MAX_VOICES voices to be spawned per audio fragment, we use this variable to ensure this limit.              int                     VoiceSpawnsLeft;       ///< We only allow CONFIG_MAX_VOICES voices to be spawned per audio fragment, we use this variable to ensure this limit.
# Line 124  namespace LinuxSampler { namespace gig { Line 126  namespace LinuxSampler { namespace gig {
126              bool                    SuspensionRequested;              bool                    SuspensionRequested;
127              ConditionServer         EngineDisabled;              ConditionServer         EngineDisabled;
128              int8_t                  ScaleTuning[12];       ///< contains optional detune factors (-64..+63 cents) for all 12 semitones of an octave              int8_t                  ScaleTuning[12];       ///< contains optional detune factors (-64..+63 cents) for all 12 semitones of an octave
129              int                     MaxFadeOutPos;         ///< The last position in an audio fragment to allow an instant fade out (e.g. for voice stealing) without leading to clicks.              int                     MinFadeOutSamples;     ///< The number of samples needed to make an instant fade out (e.g. for voice stealing) without leading to clicks.
130              uint32_t                RandomSeed;            ///< State of the random number generator used by the random dimension.              uint32_t                RandomSeed;            ///< State of the random number generator used by the random dimension.
131              Mutex                   ResetInternalMutex;    ///< Mutex to protect the ResetInternal function for concurrent usage (e.g. by the lscp and instrument loader threads).              Mutex                   ResetInternalMutex;    ///< Mutex to protect the ResetInternal function for concurrent usage (e.g. by the lscp and instrument loader threads).
132              Pool< ::gig::DimensionRegion*>* pDimRegionPool[2]; ///< Double buffered pool, used by the engine channels to keep track of dimension regions in use.              Pool< ::gig::DimensionRegion*>* pDimRegionPool[2]; ///< Double buffered pool, used by the engine channels to keep track of dimension regions in use.
# Line 184  namespace LinuxSampler { namespace gig { Line 186  namespace LinuxSampler { namespace gig {
186              static float* InitCurve(const float* segments, int size = 128);              static float* InitCurve(const float* segments, int size = 128);
187    
188              unsigned long FrameTime; ///< Time in frames of the start of the current audio fragment              unsigned long FrameTime; ///< Time in frames of the start of the current audio fragment
189    
190                atomic_t ActiveVoiceCount; ///< number of currently active voices
191                
192      };      };
193    
194  }} // namespace LinuxSampler::gig  }} // namespace LinuxSampler::gig

Legend:
Removed from v.1646  
changed lines
  Added in v.1789

  ViewVC Help
Powered by ViewVC