/[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 411 by schoenebeck, Sat Feb 26 02:01:14 2005 UTC revision 438 by persson, Wed Mar 9 22:12:15 2005 UTC
# Line 56  namespace LinuxSampler { namespace gig { Line 56  namespace LinuxSampler { namespace gig {
56       * Sampler engine for the Gigasampler format.       * Sampler engine for the Gigasampler format.
57       */       */
58      class Engine : public LinuxSampler::Engine {      class Engine : public LinuxSampler::Engine {
59          public:                    public:
60              // methods              // methods
61              Engine();              Engine();
62             ~Engine();             ~Engine();
             int  RenderAudio(LinuxSampler::gig::EngineChannel* pEngineChannel, uint Samples);  
63              void Connect(AudioOutputDevice* pAudioOut);              void Connect(AudioOutputDevice* pAudioOut);
64    
65              // implementation of abstract methods derived from class 'LinuxSampler::Engine'              // implementation of abstract methods derived from class 'LinuxSampler::Engine'
66                virtual int    RenderAudio(uint Samples);
67              virtual void   SendSysex(void* pData, uint Size);              virtual void   SendSysex(void* pData, uint Size);
68              virtual void   Reset();              virtual void   Reset();
69              virtual void   Enable();              virtual void   Enable();
# Line 78  namespace LinuxSampler { namespace gig { Line 78  namespace LinuxSampler { namespace gig {
78              virtual String Description();              virtual String Description();
79              virtual String Version();              virtual String Version();
80              virtual String EngineName();              virtual String EngineName();
81                            
82          //protected:                      //protected:
83              static InstrumentResourceManager instruments;              static InstrumentResourceManager instruments;
84    
85              AudioOutputDevice*      pAudioOutputDevice;              AudioOutputDevice*      pAudioOutputDevice;
86              uint                    SampleRate;            ///< Sample rate of the engines output audio signal (in Hz)              uint                    SampleRate;            ///< Sample rate of the engines output audio signal (in Hz)
87              uint                    MaxSamplesPerCycle;    ///< Size of each audio output buffer              uint                    MaxSamplesPerCycle;    ///< Size of each audio output buffer
88              DiskThread*             pDiskThread;                        DiskThread*             pDiskThread;
89              RingBuffer<Event>*      pEventQueue;           ///< Input event queue for engine global events (e.g. SysEx messages).              RingBuffer<Event>*      pEventQueue;           ///< Input event queue for engine global events (e.g. SysEx messages).
90              Pool<Voice>*            pVoicePool;            ///< Contains all voices that can be activated.                                                  Pool<Voice>*            pVoicePool;            ///< Contains all voices that can be activated.
91              EventGenerator*         pEventGenerator;                          EventGenerator*         pEventGenerator;
92              RTList<Event>*          pVoiceStealingQueue;   ///< All voice-launching events which had to be postponed due to free voice shortage.              RTList<Event>*          pVoiceStealingQueue;   ///< All voice-launching events which had to be postponed due to free voice shortage.
93              RTList<Event>*          pEvents;               ///< All events for the current audio fragment.              RTList<Event>*          pEvents;               ///< All events for the current audio fragment.
94              Pool<Event>*            pEventPool;            ///< Contains all Event objects that can be used.              Pool<Event>*            pEventPool;            ///< Contains all Event objects that can be used.
# Line 98  namespace LinuxSampler { namespace gig { Line 98  namespace LinuxSampler { namespace gig {
98              float*                  pSynthesisParameters[Event::destination_count]; ///< Matrix with final synthesis parameters for the current audio fragment which will be used in the main synthesis loop.              float*                  pSynthesisParameters[Event::destination_count]; ///< Matrix with final synthesis parameters for the current audio fragment which will be used in the main synthesis loop.
99              biquad_param_t*         pBasicFilterParameters; ///< Biquad parameters of the basic bandpass filter.              biquad_param_t*         pBasicFilterParameters; ///< Biquad parameters of the basic bandpass filter.
100              biquad_param_t*         pMainFilterParameters;  ///< Main biquad parameters of the individual filter (lowpass / bandpass / highpass).              biquad_param_t*         pMainFilterParameters;  ///< Main biquad parameters of the individual filter (lowpass / bandpass / highpass).
101              int                     ActiveVoiceCount;      ///< number of currently active voices              int                     ActiveVoiceCount;      ///< number of currently active voices (this value will be returned for public calls)
102                int                     ActiveVoiceCountTemp;  ///< number of currently active voices (for internal usage, will be used for incrementation)
103              int                     ActiveVoiceCountMax;   ///< the maximum voice usage since application start              int                     ActiveVoiceCountMax;   ///< the maximum voice usage since application start
104              bool                    SuspensionRequested;              bool                    SuspensionRequested;
105              ConditionServer         EngineDisabled;              ConditionServer         EngineDisabled;
106              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
             RTList<Voice>::Iterator itLastStolenVoice;      ///< Only for voice stealing: points to the last voice which was theft in current audio fragment, NULL otherwise.  
             RTList<uint>::Iterator  iuiLastStolenKey;      ///< Only for voice stealing: key number of last key on which the last voice was theft in current audio fragment, NULL otherwise.  
107              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                     MaxFadeOutPos;         ///< The last position in an audio fragment to allow an instant fade out (e.g. for voice stealing) without leading to clicks.
108                uint32_t                RandomSeed;            ///< State of the random number generator used by the random dimension.
109    
110                void RenderAudio(EngineChannel* pEngineChannel, uint Samples);
111                void ClearEventLists();
112                void ImportEvents(RingBuffer<Event>* pEventQueue, uint Samples);
113              void ProcessNoteOn(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent);              void ProcessNoteOn(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent);
114              void ProcessNoteOff(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOffEvent);              void ProcessNoteOff(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOffEvent);
115              void ProcessPitchbend(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itPitchbendEvent);              void ProcessPitchbend(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itPitchbendEvent);
# Line 129  namespace LinuxSampler { namespace gig { Line 132  namespace LinuxSampler { namespace gig {
132              friend class EGDecay;              friend class EGDecay;
133              friend class VCAManipulator;              friend class VCAManipulator;
134              friend class VCFCManipulator;              friend class VCFCManipulator;
135              friend class VCOManipulator;                          friend class VCOManipulator;
136          private:          private:
137              std::list<EngineChannel*> samplerChannels; ///< All sampler channels of a gig::Engine instance.              std::list<EngineChannel*> engineChannels; ///< All engine channels of a gig::Engine instance.
138                            
139              static std::map<AudioOutputDevice*,Engine*> engines; ///< All instances of gig::Engine.              static std::map<AudioOutputDevice*,Engine*> engines; ///< All instances of gig::Engine.
140                            
141              uint8_t GSCheckSum(const RingBuffer<uint8_t>::NonVolatileReader AddrReader, uint DataSize);              uint8_t GSCheckSum(const RingBuffer<uint8_t>::NonVolatileReader AddrReader, uint DataSize);
142              void    AdjustScale(int8_t ScaleTunes[12]);              void    AdjustScale(int8_t ScaleTunes[12]);
143      };      };

Legend:
Removed from v.411  
changed lines
  Added in v.438

  ViewVC Help
Powered by ViewVC